Skip to content

Commit

Permalink
Ensure rollback triggers execution of tasks waiting for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktrn committed Jun 12, 2024
1 parent e23047f commit 1d47cab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/webapp/app/v3/services/rollbackDeployment.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { logger } from "~/services/logger.server";
import { BaseService } from "./baseService.server";
import { WorkerDeployment } from "@trigger.dev/database";
import { CURRENT_DEPLOYMENT_LABEL } from "~/consts";
import { ExecuteTasksWaitingForDeployService } from "./executeTasksWaitingForDeploy";

export class RollbackDeploymentService extends BaseService {
public async call(deployment: WorkerDeployment) {
Expand Down Expand Up @@ -39,6 +40,10 @@ export class RollbackDeploymentService extends BaseService {
},
});

if (deployment.workerId) {
await ExecuteTasksWaitingForDeployService.enqueue(deployment.workerId, this._prisma);
}

return {
id: deployment.id,
};
Expand Down

0 comments on commit 1d47cab

Please sign in to comment.