File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/client/lib/client Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const PN = {
2121 FAILING_OVER : "FAILING_OVER" ,
2222 FAILED_OVER : "FAILED_OVER" ,
2323 SMIGRATING : "SMIGRATING" ,
24+ SMIGRATED : "SMIGRATED" ,
2425} ;
2526
2627export type DiagnosticsEvent = {
@@ -56,6 +57,7 @@ interface Client {
5657 connect : ( ) => Promise < Client > ;
5758 destroy : ( ) => void ;
5859 on : ( event : string , callback : ( value : unknown ) => void ) => void ;
60+ emit : ( event : string , ...args : Array < unknown > ) => void ;
5961}
6062
6163export default class EnterpriseMaintenanceManager {
@@ -165,6 +167,11 @@ export default class EnterpriseMaintenanceManager {
165167 this . #onMigrated( ) ;
166168 return true ;
167169 }
170+ case PN . SMIGRATED : {
171+ dbgMaintenance ( "Received SMIGRATED" ) ;
172+ this . #onSMigrated( ) ;
173+ return true ;
174+ }
168175 }
169176 return false ;
170177 } ;
@@ -301,6 +308,10 @@ export default class EnterpriseMaintenanceManager {
301308
302309 this . #client. _maintenanceUpdate ( update ) ;
303310 } ;
311+
312+ #onSMigrated = ( ) => {
313+ this . #client. emit ( '__MOVED' , this . #commandsQueue. removeAllPubSubListeners ( ) ) ;
314+ }
304315}
305316
306317export type MovingEndpointType =
You can’t perform that action at this time.
0 commit comments