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

Fix race condition in trigger disable #2858

Merged
merged 13 commits into from
Nov 25, 2020
Prev Previous commit
Next Next commit
Fix PubSub Scheduled
  • Loading branch information
samtstern committed Nov 25, 2020
commit e72ddffcf9d145a55a0cd471b41eb5cfb51e8ee3
6 changes: 3 additions & 3 deletions src/emulator/functionsEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export class FunctionsEmulator implements EmulatorInstance {
break;
case Constants.SERVICE_PUBSUB:
added = await this.addPubsubTrigger(
this.args.projectId,
definition.name,
key,
definition.eventTrigger,
definition.schedule
Expand Down Expand Up @@ -572,7 +572,7 @@ export class FunctionsEmulator implements EmulatorInstance {
}

async addPubsubTrigger(
projectId: string,
triggerName: string,
key: string,
eventTrigger: EventTrigger,
schedule: EventSchedule | undefined
Expand All @@ -593,7 +593,7 @@ export class FunctionsEmulator implements EmulatorInstance {
// In production this topic looks like
// "firebase-schedule-{FUNCTION_NAME}-{DEPLOY-LOCATION}", we simply drop
// the deploy location to match as closely as possible.
topic = "firebase-schedule-" + key;
topic = "firebase-schedule-" + triggerName;
} else {
const resourceParts = resource.split("/");
topic = resourceParts[resourceParts.length - 1];
Expand Down