-
Notifications
You must be signed in to change notification settings - Fork 0
changed durable's API to use rust durations #41
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
Conversation
|
@codex review |
1 similar comment
|
@codex review |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .bind(queue_name) | ||
| .bind(worker_id) | ||
| .bind(claim_timeout as i32) | ||
| .bind(claim_timeout.as_secs() as i32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalize sub-second claim timeouts before DB use
Because WorkerOptions::claim_timeout is now a Duration, callers can pass sub‑second values (e.g., Duration::from_millis(1500)). Here that value is truncated with as_secs() before the DB claim/update, while the worker timers (and lease extender) still use the full Duration. That mismatch means the DB lease can expire earlier than the worker expects, allowing another worker to reclaim the task while the original is still running. Consider rejecting non‑integral seconds at start_worker or rounding up/normalizing to whole seconds everywhere you use claim_timeout.
Useful? React with 👍 / 👎.
No description provided.