make_on_job_start#

safir.metrics.make_on_job_start(queue_name)#

Make a function that publishes an event for every job execution.

This should be set as, or composed with, your on_job_start function in your Arq WorkerSettings class. You need to also call safir.metrics.initialize_arq_metrics in your worker on_startup function.

Parameters:

queue_name (str) – The name of the queue that this worker will be listening on.

Return type:

StartupShutdown