Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/services/platform.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ const handlePlatformCleanup = async (platform: HydratedDocument<IPlatform>): Pro
case PlatformNames.Website: {
if (platform.metadata?.scheduleId) {
await websiteService.coreService.deleteWebsiteSchedule(platform.metadata.scheduleId);
await websiteService.coreService.terminateWebsiteWorkflow(platform.community.toString());
}
break;
}
Expand All @@ -373,7 +374,7 @@ const handleWebsiteResourceChanges = async (
if (oldResources === newResources) return;

if (platform.metadata.scheduleId) {
await websiteService.coreService.deleteWebsiteSchedule(platform.metadata.scheduleId);
// await websiteService.coreService.deleteWebsiteSchedule(platform.metadata.scheduleId);
await websiteService.coreService.terminateWebsiteWorkflow(platform.community.toString());
updateBody.metadata.scheduleId = null;
}
Expand Down
3 changes: 2 additions & 1 deletion src/services/temporal/website.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class TemporalWebsiteService extends TemporalCoreService {

try {
const client: Client = await this.getClient();
console.log('type', typeof platformId.toString());
return client.schedule.create({
scheduleId: `website/${uuidv4()}`,
spec: {
Expand Down Expand Up @@ -62,8 +61,10 @@ class TemporalWebsiteService extends TemporalCoreService {
}

public async terminateWorkflow(workflowId: string): Promise<void> {
console.log(workflowId);
const client: Client = await this.getClient();
const handle = client.workflow.getHandle(workflowId);
console.log(handle);
await handle.terminate();
}
}
Expand Down