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

Enqueue task with guaranteed execution after delay #499

Closed
ClementNerma opened this issue Feb 14, 2024 · 2 comments
Closed

Enqueue task with guaranteed execution after delay #499

ClementNerma opened this issue Feb 14, 2024 · 2 comments
Labels
s: Client This issue touches the pueue client s: Daemon This issue touches pueue daemon s: Pueue-lib This issue touches the pueue-lib library t: Feature A new feature that needs implementation

Comments

@ClementNerma
Copy link

A detailed description of the feature you would like to see added.

Add the ability to enqueue a task to run after a specific delay, and ensure it gets run independently of the parallel tasks limit.

Explain your usecase of the requested feature

Ensure a task will run precisely at the desired time, without having to worry about it being enqueued for an unpredictable amount of time depending on the number of other tasks running at that moment.

Alternatives

No response

Additional context

No response

@Nukesor
Copy link
Owner

Nukesor commented Feb 14, 2024

A simple way to achieve this would be to create a group with a high worker limit.

For now, I'll delay building dedicated flag until a few other people wish for such a feature as well, as it's quite easy to do without a dedicated flag.

@Nukesor Nukesor added s: Pueue-lib This issue touches the pueue-lib library s: Daemon This issue touches pueue daemon s: Client This issue touches the pueue client t: Feature A new feature that needs implementation labels Feb 14, 2024
@Nukesor
Copy link
Owner

Nukesor commented Feb 15, 2024

With #500 in place, I think it's reasonable enough to close this issue.

I'm not a big fan of the idea to mix time-scheduled tasks in the same queue as tasks that should be balanced based on the amount of tasks in a queue.

Having these in two different queues is a much cleaner approach and it's a pratice we should incourage instead of mixing things up. I'll close this issue for now, until there's a special usecase that requires such a feature :)

@Nukesor Nukesor closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s: Client This issue touches the pueue client s: Daemon This issue touches pueue daemon s: Pueue-lib This issue touches the pueue-lib library t: Feature A new feature that needs implementation
Projects
None yet
Development

No branches or pull requests

2 participants