Skip to content

Commit

Permalink
Merge pull request #67 from Space48/feat/queue-timezone
Browse files Browse the repository at this point in the history
Feat/queue timezone
  • Loading branch information
seanpertet authored Jul 8, 2024
2 parents 540d720 + e7b5359 commit 8565c1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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

0 comments on commit 8565c1c

Please sign in to comment.