Browse Source

fix cron error

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
2ed8353956
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/src/crons/crons.service.ts

+ 1 - 1
server/src/crons/crons.service.ts

@@ -70,7 +70,7 @@ export class CronsService {
         // get current socket
         // get current socket
         const socketClient = clients.get(currentJob.clientId);
         const socketClient = clients.get(currentJob.clientId);
 
 
-        if (!socketClient) {
+        if (socketClient) {
           // emit event to current client, loading and indexing events are indetified as collection update
           // emit event to current client, loading and indexing events are indetified as collection update
           socketClient.emit(WS_EVENTS.COLLECTION_UPDATE, collections);
           socketClient.emit(WS_EVENTS.COLLECTION_UPDATE, collections);