Skip to content

Commit

Permalink
instrument worker run method
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Nov 19, 2024
1 parent 60fa145 commit 2b6e1d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ impl<T: Task + Sync> Worker<T> {
/// # });
/// # }
/// ```
#[instrument(skip(self), fields(queue.name = self.queue.name), err)]
pub async fn run_every(&self, period: Span) -> Result {
let mut polling_interval = tokio::time::interval(period.try_into()?);

Expand Down Expand Up @@ -610,6 +611,13 @@ impl<T: Task + Sync> Worker<T> {
Ok(())
}

#[instrument(
skip_all,
fields(
processing = processing_tasks.len(),
permits = concurrency_limit.available_permits()
)
)]
async fn trigger_task_processing(
&self,
concurrency_limit: Arc<Semaphore>,
Expand Down

0 comments on commit 2b6e1d9

Please sign in to comment.