Skip to content

DisableConcurrentExecution demo improvement: logging with timestamp and thread ID#2537

Open
domenicodonia wants to merge 1 commit intoHangfireIO:mainfrom
domenicodonia:feature/logging-con-timestamp-e-threadid
Open

DisableConcurrentExecution demo improvement: logging with timestamp and thread ID#2537
domenicodonia wants to merge 1 commit intoHangfireIO:mainfrom
domenicodonia:feature/logging-con-timestamp-e-threadid

Conversation

@domenicodonia
Copy link

This PR introduces an improvement to the DisableConcurrentExecutionDemo demo by adding detailed logging that includes:

  • Job start and end timestamps (DateTime.Now:HH:mm:ss)
  • Thread ID (Thread.CurrentThread.ManagedThreadId)

This helps to clearly visualize the effect of [DisableConcurrentExecution], showing that jobs are not running in parallel.

Terminal output example:
[2025-08-06 18:08:03.292] [Thread 36] Job started.
[2025-08-06 18:08:13.317] [Thread 36] Job completed.

The change is purely educational and does not impact the core of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant