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

Delivery delay mechanism #54

Open
AsyncAlchemist opened this issue Jul 12, 2024 · 3 comments
Open

Delivery delay mechanism #54

AsyncAlchemist opened this issue Jul 12, 2024 · 3 comments

Comments

@AsyncAlchemist
Copy link

I'm interested in adding a delivery delay mechanism to your library to allow messages to be scheduled for future delivery. It would prevent messages from being delivered to runners until a specific time has been reached. After this time has passed, the message would be available to any runner to be delivered. If no time is set or the time scheduled is in the past, the behavior would be the library's existing behavior.

Please let me know if you'd be interested in receiving a PR for this improvement and if you have any guidelines you'd like me to follow. If so, feel free to assign me to the issue and I will begin work on this.

This improvement would most likely require a database migration.

@markuswustenberg
Copy link
Member

Hi @AsyncAlchemist, thank you for your issue. I'm currently on summer holiday and won't be doing any work until August.

There's already a delay on the Message. Is that what you need? Or is it to delay jobs in that abstraction?

See https://pkg.go.dev/github.com/maragudk/goqite#Message

@AsyncAlchemist
Copy link
Author

Ahhh, I see that now. I think this should work. My idea was to delay jobs until a certain time, so this should work.

By the way this feature is not documented anywhere. Would you let me to add an example of how to use this to the documentation?

@markuswustenberg
Copy link
Member

It's documented under Send:

Send a Message to the queue with an optional delay.

https://pkg.go.dev/github.com/maragudk/goqite#Queue.Send

But definitely feel free to add a testable example, preferably named ExampleSend_delay. 😊

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

No branches or pull requests

2 participants