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

[FEATURE] Adjust task delay duration before first call #115

Open
lqmanh opened this issue Sep 30, 2020 · 1 comment · May be fixed by #192
Open

[FEATURE] Adjust task delay duration before first call #115

lqmanh opened this issue Sep 30, 2020 · 1 comment · May be fixed by #192
Labels
enhancement New feature or request

Comments

@lqmanh
Copy link

lqmanh commented Sep 30, 2020

Is your feature request related to a problem? Please describe.
For now, repeat_every decorator only allows us to delay the first call exactly 1 interval with wait_first set to True. We can't do things like wait for 1 minute, then execute the task every 1 hour.

Describe the solution you'd like
Make wait_first accept an int argument.

@repeat_every(seconds=3600, wait_first=60)
def foo():
    """Wait for 60s, then execute this once per hour."""

@repeat_every(seconds=3600, wait_first=True)
def bar():
    """Wait for 1 hour, then execute this once per hour."""
@lqmanh lqmanh added the enhancement New feature or request label Sep 30, 2020
@jkklapp
Copy link

jkklapp commented Apr 5, 2021

Im happy to take this one

@jkklapp jkklapp linked a pull request Apr 5, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants