20000: Refresh container record after cancel or resume to reduce flickering
authorStephen Smith <stephen@curii.com>
Thu, 16 Feb 2023 20:21:56 +0000 (15:21 -0500)
committerStephen Smith <stephen@curii.com>
Thu, 16 Feb 2023 20:21:56 +0000 (15:21 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/processes/processes-actions.ts

index cfda51ddc9fde7524d3e34b700f66d7f76a0b382..0b2de8373ca83769f9ee0d548e95530cba053ea2 100644 (file)
@@ -115,6 +115,10 @@ export const cancelRunningWorkflow = (uuid: string) =>
         try {
             const process = await services.containerRequestService.update(uuid, { priority: 0 });
             dispatch<any>(updateResources([process]));
+            if (process.containerUuid) {
+                const container = await services.containerService.get(process.containerUuid, false);
+                dispatch<any>(updateResources([container]));
+            }
             return process;
         } catch (e) {
             throw new Error('Could not cancel the process.');
@@ -126,6 +130,10 @@ export const resumeOnHoldWorkflow = (uuid: string) =>
         try {
             const process = await services.containerRequestService.update(uuid, { priority: 500 });
             dispatch<any>(updateResources([process]));
+            if (process.containerUuid) {
+                const container = await services.containerService.get(process.containerUuid, false);
+                dispatch<any>(updateResources([container]));
+            }
             return process;
         } catch (e) {
             throw new Error('Could not resume the process.');