Skip to content

Commit 1d47cab

Browse files
committed
Ensure rollback triggers execution of tasks waiting for deploy
1 parent e23047f commit 1d47cab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/webapp/app/v3/services/rollbackDeployment.server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { logger } from "~/services/logger.server";
22
import { BaseService } from "./baseService.server";
33
import { WorkerDeployment } from "@trigger.dev/database";
44
import { CURRENT_DEPLOYMENT_LABEL } from "~/consts";
5+
import { ExecuteTasksWaitingForDeployService } from "./executeTasksWaitingForDeploy";
56

67
export class RollbackDeploymentService extends BaseService {
78
public async call(deployment: WorkerDeployment) {
@@ -39,6 +40,10 @@ export class RollbackDeploymentService extends BaseService {
3940
},
4041
});
4142

43+
if (deployment.workerId) {
44+
await ExecuteTasksWaitingForDeployService.enqueue(deployment.workerId, this._prisma);
45+
}
46+
4247
return {
4348
id: deployment.id,
4449
};

0 commit comments

Comments
 (0)