File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -374,7 +374,7 @@ const handleWebsiteResourceChanges = async (
374374 if ( oldResources === newResources ) return ;
375375
376376 if ( platform . metadata . scheduleId ) {
377- // await websiteService.coreService.deleteWebsiteSchedule(platform.metadata.scheduleId);
377+ await websiteService . coreService . deleteWebsiteSchedule ( platform . metadata . scheduleId ) ;
378378 await websiteService . coreService . terminateWebsiteWorkflow ( platform . community . toString ( ) ) ;
379379 updateBody . metadata . scheduleId = null ;
380380 }
Original file line number Diff line number Diff line change @@ -57,17 +57,16 @@ class TemporalWebsiteService extends TemporalCoreService {
5757 public async deleteSchedule ( scheduleId : string ) : Promise < void > {
5858 const client : Client = await this . getClient ( ) ;
5959 const handle = client . schedule . getHandle ( scheduleId ) ;
60+
6061 await handle . delete ( ) ;
6162 }
6263
6364 public async terminateWorkflow ( workflowId : string ) : Promise < void > {
64- console . log ( workflowId ) ;
6565 const client : Client = await this . getClient ( ) ;
6666 const handle = client . workflow . getHandle ( workflowId ) ;
6767 const description = await handle . describe ( ) ;
68- console . log ( description ) ;
69- if ( description . status . name === 'TERMINATED' ) {
70- await handle . terminate ( ) ;
68+ if ( description . status . name !== 'TERMINATED' && description . status . name !== 'COMPLETED' ) {
69+ await handle . terminate ( 'Terminated due to schedule deletion' ) ;
7170 }
7271 }
7372}
You can’t perform that action at this time.
0 commit comments