public createTimer()

in src/orchestrations/DurableOrchestrationContext.ts [269:297]


    public createTimer(fireAt: Date): TimerTask {
        const timerAction = new CreateTimerAction(fireAt);
        const durationUntilFire = moment.duration(moment(fireAt).diff(this.currentUtcDateTime));
        if (this.schemaVersion >= ReplaySchema.V3) {
            if (!this.maximumShortTimerDuration || !this.longRunningTimerIntervalDuration) {
                throw Error(
                    "A framework-internal error was detected: replay schema version >= V3 is being used, " +
                        "but one or more of the properties `maximumShortTimerDuration` and `longRunningTimerIntervalDuration` are not defined. " +
                        "This is likely an issue with the Durable Functions Extension. " +
                        "Please report this bug here: https://github.com/Azure/azure-functions-durable-js/issues\n" +
                        `maximumShortTimerDuration: ${this.maximumShortTimerDuration}\n` +
                        `longRunningTimerIntervalDuration: ${this.longRunningTimerIntervalDuration}`
                );
            }

            if (durationUntilFire > this.maximumShortTimerDuration) {
                return new LongTimerTask(
                    false,
                    timerAction,
                    this,
                    this.taskOrchestratorExecutor,
                    this.maximumShortTimerDuration.toISOString(),
                    this.longRunningTimerIntervalDuration.toISOString()
                );
            }
        }

        return new DFTimerTask(false, timerAction);
    }