Skip to content
Snippets Groups Projects
Commit 6ec5479a authored by Imre Toth's avatar Imre Toth
Browse files

Fix for one last log fetching when deploying IOC

parent 902600c3
No related branches found
No related tags found
1 merge request!60Fix for one last log fetching when deploying IOC
Pipeline #91905 passed
......@@ -6,15 +6,21 @@ export function DeploymentJobOutput({ awxJobId, update }) {
const [deploymentJob, getDeploymentJob] = useDeploymentJob(awxJobId);
const stdoutRef = useRef(null);
const [firstTime, setFirstTime] = useState(true);
const [oneMoreIteration, setOneMoreIteration] = useState(true);
useEffect(() => {
const interval = setInterval(() => {
if (update) {
getDeploymentJob();
}
if(!update && oneMoreIteration) {
getDeploymentJob();
setOneMoreIteration(false);
}
}, 5000);
return () => clearInterval(interval);
}, [update, getDeploymentJob]);
}, [update, oneMoreIteration, getDeploymentJob]);
useEffect(() => {
function scrollDown() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment