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

alter trace levels #74

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl<T: Task> Scheduler<T> {
pub async fn run(&self) -> Result {
let conn = self.queue.pool.acquire().await?;
let Some(guard) = try_acquire_advisory_lock(conn, &self.queue_lock).await? else {
tracing::debug!("Scheduler could not acquire lock, exiting");
tracing::trace!("Scheduler could not acquire lock, exiting");
return Ok(());
};

Expand Down
8 changes: 4 additions & 4 deletions src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ impl<T: Task + Sync> Worker<T> {
async fn handle_shutdown(&self, processing_tasks: &mut JoinSet<()>) -> Result {
let task_timeout = self.task.timeout();

tracing::info!(
tracing::debug!(
task.timeout = ?task_timeout,
"Waiting for all processing tasks or timeout"
);
Expand Down Expand Up @@ -624,7 +624,7 @@ impl<T: Task + Sync> Worker<T> {
processing_tasks: &mut JoinSet<()>,
) {
let Ok(permit) = concurrency_limit.try_acquire_owned() else {
tracing::debug!("Concurrency limit reached");
tracing::trace!("Concurrency limit reached");
return;
};

Expand Down Expand Up @@ -860,7 +860,7 @@ impl<T: Task + Sync> Worker<T> {
retry_count: RetryCount,
retry_policy: &RetryPolicy,
) -> Result {
tracing::info!("Retry policy available, scheduling retry");
tracing::debug!("Retry policy available, scheduling retry");

let delay = retry_policy.calculate_delay(retry_count);
in_progress_task.retry_after(&mut *conn, delay).await?;
Expand All @@ -873,7 +873,7 @@ impl<T: Task + Sync> Worker<T> {
conn: &mut PgConnection,
in_progress_task: &InProgressTask,
) -> Result {
tracing::info!("Retry policy exhausted, handling failed task");
tracing::debug!("Retry policy exhausted, handling failed task");

in_progress_task.mark_failed(&mut *conn).await?;

Expand Down