Skip to content

Conversation

@kamperiadis
Copy link
Contributor

Issue describing the changes in this PR

Resolves #114
Currently, we do not support timers longer than 7 days. However, the changes in this PR work around that by breaking up a single long timer into several shorter ones.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Just a couple small suggestions from me.

Copy link
Member

@kaibocai kaibocai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, add 2 minnor comments.

}

/**
* Sets the maximum timer interval. If not specified, the default maximum timer interval duration will be used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can mention the current default duration is 3 days.

Comment on lines 556 to 559
while (remainingTime.compareTo(this.maximumTimerInterval) > 0) {
Instant nextFireAt = this.currentInstant.plus(this.maximumTimerInterval);
createInstantTimer(this.sequenceNumber++, nextFireAt).await();
remainingTime = Duration.between(finalFireAt, this.currentInstant);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar logics should also be added to method createTimer(ZoneDateTime)

Copy link
Member

@cgillum cgillum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (Looks Good To Me)!

Just one minor suggestion which you can choose to incorporate or skip.

@kamperiadis kamperiadis merged commit a444d95 into microsoft:main Mar 7, 2023
@kamperiadis kamperiadis deleted the kamperiadis/longTimer branch March 7, 2023 22:55
@kanupriya15025
Copy link

@kamperiadis Is this released in the SDK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Eternal Orchestrator] Timers more than 7days giving error

4 participants