* fix: ensure default calendars * test: add E2E tests for delegation credential controller and update tasker config - Add E2E tests to verify ensureDefaultCalendars is called when enabling delegation credentials - Update calendars tasker config to use medium-1x machine for retry on OOM - Set minimum retry backoff to 60 seconds (1 minute between retries) Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: update tasker config to use small-2x machine with outOfMemory retry on medium-1x Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: update E2E tests to properly spy on service instance and use valid workspace platform slug Co-Authored-By: morgan@cal.com <morgan@cal.com> * ci: add CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY to E2E API v2 workflow Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: add encryption key to E2E test file for delegation credentials Co-Authored-By: morgan@cal.com <morgan@cal.com> * revert: remove CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY from workflow (moved to test file) Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: move encryption key to setEnvVars.ts for E2E tests Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: use valid format for service account encryption key Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: encrypt service account key in E2E test for delegation credentials Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: mock updateDelegationCredentialEnabled to bypass Google API call in E2E tests Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: get service from app.get() after initialization for proper spy setup in E2E tests Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: use jest.mock() to mock toggleDelegationCredentialEnabled and bypass Google API calls in E2E tests Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: use Service.prototype pattern for spying on ensureDefaultCalendars in E2E tests Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: move spy setup to beforeAll before app.init() for proper NestJS interception Co-Authored-By: morgan@cal.com <morgan@cal.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
24 lines
525 B
TypeScript
24 lines
525 B
TypeScript
import { type schemaTask, queue } from "@trigger.dev/sdk";
|
|
|
|
type CalendarsTask = Pick<Parameters<typeof schemaTask>[0], "machine" | "retry" | "queue">;
|
|
|
|
export const calendarsQueue = queue({
|
|
name: "calendars",
|
|
concurrencyLimit: 10,
|
|
});
|
|
|
|
export const calendarsTaskConfig: CalendarsTask = {
|
|
machine: "small-2x",
|
|
queue: calendarsQueue,
|
|
retry: {
|
|
maxAttempts: 3,
|
|
factor: 2,
|
|
minTimeoutInMs: 60000,
|
|
maxTimeoutInMs: 300000,
|
|
randomize: true,
|
|
outOfMemory: {
|
|
machine: "medium-1x",
|
|
},
|
|
},
|
|
};
|