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

[pgmq] implement send_delay #165

Closed
ChuckHend opened this issue Mar 19, 2023 · 1 comment
Closed

[pgmq] implement send_delay #165

ChuckHend opened this issue Mar 19, 2023 · 1 comment
Labels
enhancement New feature or request pgmq

Comments

@ChuckHend
Copy link
Member

ChuckHend commented Mar 19, 2023

Implement a send_delay function on the PGMQueue struct. send_delay is almost identical to send, but it will take another required parameter: delay_seconds: i64. This parameter will set the "visibility timeout" to now() + delay_seconds.

A message with delay_seconds = 0 is immediately available for consumers to process. A message with delay_seconds = 60 would not be processed until 60 seconds from the time it is sent. This is very useful when a sender when the sender is sending tasks, and wants one task to be executed at an arbitrary time in the future.

Getting started:

  • Add a new function, similar to send, but should have an additional parameter for he delay/
  • modify the enqueue query to apply now() + delay
@ChuckHend ChuckHend added the enhancement New feature or request label Mar 19, 2023
@ChuckHend
Copy link
Member Author

Closed in #186

sjmiller609 pushed a commit that referenced this issue Dec 5, 2023
* first round of removing code

* bump jobs to 2

* refactor tests, cicd

* fixing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pgmq
Projects
None yet
Development

No branches or pull requests

2 participants