Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/queue timezone #67

Merged
merged 4 commits into from
Jul 8, 2024
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
2 changes: 2 additions & 0 deletions stacks/gcp/GcpStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export default class GcpStack extends TerraformStack {
new cloudSchedulerJob.CloudSchedulerJob(this, "scheduler-" + func.name, {
name: func.name,
schedule: func.schedule,
timeZone: func.timeZone,
pubsubTarget: {
topicName: `projects/${this.options.gcpOptions.project}/topics/${scheduledTopic.name}`,
data: "c2NoZWR1bGU=",
Expand All @@ -170,6 +171,7 @@ export default class GcpStack extends TerraformStack {
name: func.name,
schedule: func.schedule,
attemptDeadline: func.attemptDeadline || "3m",
timeZone: func.timeZone,
httpTarget: {
uri: (cloudFunc as cloudfunctions2Function.Cloudfunctions2Function).serviceConfig.uri,
httpMethod: "POST",
Expand Down
2 changes: 2 additions & 0 deletions types/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ export type EventConfig = {
export type ScheduleConfig = {
type: "schedule";
schedule: string;
timeZone?: string;
} & FunctionConfig;

// This is to trigger the cloud function directly from scheduled job, rather than triggering through a pub/sub topic
export type ScheduledJobConfig = {
type: "scheduledJob";
schedule: string;
attemptDeadline?: string;
timeZone?: string;
} & FunctionConfig;

export type QueueConfig = {
Expand Down
Loading