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: Add rescheduleOrCreate method to the SchedulerClient #553

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beilCrxmarkets
Copy link

feat: Add rescheduleOrCreate method to the SchedulerClient

When invoking SchedulerClient.reschedule() with a non-existent TaskInstance, an exception will be raised. Therefore, it's essential to verify the existence of a scheduled TaskInstance prior to attempting a reschedule. To streamline this process, we propose the introduction of a scheduleOrCreate method. This method would automatically schedule a TaskInstance if none exists, making it particularly beneficial for dynamically recurring tasks that require initial setup.

We have given considerable thought to finding an appropriate name for this method, but unfortunately, we haven't arrived at a satisfactory conclusion. The verb "schedule" best describes its functionality; however, it cannot be used as there is already a method with that name. Since "rescheduleOrSchedule" sounds awkward, we have settled on "rescheduleOrCreate" for now. We are open to considering other names for this method.

Fixes

#539

Reminders

  • Added/ran automated tests
  • Update README and/or examples
  • Ran mvn spotless:apply

cc @kagkarlsson

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.

1 participant