Skip to content

Commit 49163c6

Browse files
authored
Merge branch 'main' into docs/supabase-ffmpeg-deepgram-example
2 parents ade508a + 2a04d17 commit 49163c6

File tree

5 files changed

+32
-2
lines changed

5 files changed

+32
-2
lines changed

.changeset/gentle-mails-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Local env files like `.env` will now correctly override dev env vars configured in the dashboard

apps/webapp/app/presenters/v3/RunPresenter.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class RunPresenter {
7474
},
7575
});
7676

77-
const showLogs = showDeletedLogs ? true : run.logsDeletedAt ? false : true;
77+
const showLogs = showDeletedLogs || !run.logsDeletedAt;
7878

7979
const runData = {
8080
id: run.id,

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,23 @@ export class TriggerScheduledTaskService extends BaseService {
4040
}
4141

4242
if (!instance.taskSchedule.active) {
43+
shouldTrigger = false;
44+
} else if (instance.environment.organization.deletedAt) {
45+
logger.debug("Organization is deleted, disabling schedule", {
46+
instanceId,
47+
scheduleId: instance.taskSchedule.friendlyId,
48+
organizationId: instance.environment.organization.id,
49+
});
50+
51+
await this._prisma.taskSchedule.update({
52+
where: {
53+
id: instance.taskSchedule.id,
54+
},
55+
data: {
56+
active: false,
57+
},
58+
});
59+
4360
shouldTrigger = false;
4461
}
4562

packages/cli-v3/src/dev/backgroundWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ export class BackgroundWorker {
319319
const processOptions: TaskRunProcessOptions = {
320320
payload,
321321
env: {
322-
...sanitizeEnvVars(this.params.env),
323322
// TODO: this needs the stripEmptyValues stuff too
324323
...sanitizeEnvVars(payload.environment ?? {}),
324+
...sanitizeEnvVars(this.params.env),
325325
TRIGGER_WORKER_MANIFEST_PATH: this.workerManifestPath,
326326
},
327327
serverWorker: this.serverWorker,

references/v3-catalog/src/trigger/other.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,11 @@ export const returnZeroCharacters = task({
156156
};
157157
},
158158
});
159+
160+
export const testEnvVars = task({
161+
id: "test-env-vars",
162+
run: async (payload: any) => {
163+
console.log(`env.FOO: ${process.env.FOO}`);
164+
console.log(`env.BAR: ${process.env.BAR}`);
165+
},
166+
});

0 commit comments

Comments
 (0)