@@ -178,6 +178,22 @@ class TaskCoordinator {
178
178
} ;
179
179
}
180
180
181
+ //if this is set, we want to kill the process because it will be resumed with the checkpoint from the queue
182
+ if ( taskSocket . data . requiresCheckpointResumeWithMessage ) {
183
+ logger . log ( "RESUME_AFTER_DEPENDENCY_WITH_ACK: Checkpoint is set so going to nack" , {
184
+ socketData : taskSocket . data ,
185
+ } ) ;
186
+
187
+ return {
188
+ success : false ,
189
+ error : {
190
+ name : "CheckpointMessagePresentError" ,
191
+ message :
192
+ "Checkpoint message is present, so we need to kill the process and resume from the queue." ,
193
+ } ,
194
+ } ;
195
+ }
196
+
181
197
await chaosMonkey . call ( ) ;
182
198
183
199
// In case the task resumed faster than we could checkpoint
@@ -819,6 +835,12 @@ class TaskCoordinator {
819
835
return ;
820
836
}
821
837
838
+ //setting this means we can only resume from a checkpoint
839
+ socket . data . requiresCheckpointResumeWithMessage = `location:${ checkpoint . location } -docker:${ checkpoint . docker } ` ;
840
+ logger . log ( "WAIT_FOR_TASK set requiresCheckpointResumeWithMessage" , {
841
+ requiresCheckpointResumeWithMessage : socket . data . requiresCheckpointResumeWithMessage ,
842
+ } ) ;
843
+
822
844
const ack = await this . #platformSocket?. sendWithAck ( "CHECKPOINT_CREATED" , {
823
845
version : "v1" ,
824
846
attemptFriendlyId : message . attemptFriendlyId ,
@@ -889,6 +911,12 @@ class TaskCoordinator {
889
911
return ;
890
912
}
891
913
914
+ //setting this means we can only resume from a checkpoint
915
+ socket . data . requiresCheckpointResumeWithMessage = `location:${ checkpoint . location } -docker:${ checkpoint . docker } ` ;
916
+ logger . log ( "WAIT_FOR_BATCH set requiresCheckpointResumeWithMessage" , {
917
+ requiresCheckpointResumeWithMessage : socket . data . requiresCheckpointResumeWithMessage ,
918
+ } ) ;
919
+
892
920
const ack = await this . #platformSocket?. sendWithAck ( "CHECKPOINT_CREATED" , {
893
921
version : "v1" ,
894
922
attemptFriendlyId : message . attemptFriendlyId ,
0 commit comments