[ARVADOS-WORKBENCH2] updated: 1.2.0-220-g18e651d

Git user git at public.curoverse.com
Thu Aug 30 08:56:43 EDT 2018


Summary of changes:
 src/websocket/websocket.ts | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

       via  18e651dbee6e598bd79576b178fb4d755cd7a424 (commit)
      from  de93a71c82562f2fdedfd485c5d0164651300140 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 18e651dbee6e598bd79576b178fb4d755cd7a424
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Thu Aug 30 14:56:29 2018 +0200

    Lmit updates to create and update event types
    
    Feature #14099
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/websocket/websocket.ts b/src/websocket/websocket.ts
index d45f379..d7072d7 100644
--- a/src/websocket/websocket.ts
+++ b/src/websocket/websocket.ts
@@ -6,7 +6,7 @@ import { RootStore } from '~/store/store';
 import { AuthService } from '~/services/auth-service/auth-service';
 import { Config } from '~/common/config';
 import { WebSocketService } from './websocket-service';
-import { ResourceEventMessage } from './resource-event-message';
+import { ResourceEventMessage, ResourceEventMessageType } from './resource-event-message';
 import { ResourceKind } from '~/models/resource';
 import { loadProcess } from '~/store/processes/processes-actions';
 import { loadContainers } from '../store/processes/processes-actions';
@@ -19,14 +19,17 @@ export const initWebSocket = (config: Config, authService: AuthService, store: R
 };
 
 const messageListener = (store: RootStore) => (message: ResourceEventMessage) => {
-    switch (message.objectKind) {
-        case ResourceKind.CONTAINER_REQUEST:
-            return store.dispatch(loadProcess(message.objectUuid));
-        case ResourceKind.CONTAINER:
-            return store.dispatch(loadContainers(
-                new FilterBuilder().addIn('uuid', [message.objectUuid]).getFilters()
-            ));
-        default:
-            return;
+    if (message.eventType === ResourceEventMessageType.CREATE || message.eventType === ResourceEventMessageType.UPDATE) {
+        switch (message.objectKind) {
+            case ResourceKind.CONTAINER_REQUEST:
+                return store.dispatch(loadProcess(message.objectUuid));
+            case ResourceKind.CONTAINER:
+                return store.dispatch(loadContainers(
+                    new FilterBuilder().addIn('uuid', [message.objectUuid]).getFilters()
+                ));
+            default:
+                return;
+        }
     }
+    return ;
 };

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list