Skip to content

Commit

Permalink
provide queue name in dequeue update (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman authored Nov 17, 2024
1 parent ab36387 commit e045d18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ impl<T: Task> Queue<T> {
and (retry_policy).max_attempts > (
select count(*)
from underway.task_attempt
where task_id = id
and task_queue_name = $1
where task_queue_name = $1
and task_id = id
)
)
)
Expand All @@ -694,15 +694,16 @@ impl<T: Task> Queue<T> {
last_attempt_at = now(),
last_heartbeat_at = now()
from available_task
where t.id = available_task.id
where t.task_queue_name = $1
and t.id = available_task.id
returning
t.id as "id: TaskId",
task_queue_name as "queue_name",
input,
timeout,
heartbeat,
retry_policy as "retry_policy: RetryPolicy",
concurrency_key
t.task_queue_name as "queue_name",
t.input,
t.timeout,
t.heartbeat,
t.retry_policy as "retry_policy: RetryPolicy",
t.concurrency_key
"#,
self.name,
TaskState::Pending as TaskState,
Expand Down

0 comments on commit e045d18

Please sign in to comment.