malthe / pq

A PostgreSQL job queueing system
376 stars 41 forks source link

Logging message not explicit #75

Open pmithrandir opened 5 months ago

pmithrandir commented 5 months ago

When reading the logs, the message seems not very explicit. We though that we were having a timeout against the PQ database, while in fact that message just says "the queue was empty for too long"

Changing that message would help to debug quickly the issues.

Expected Behavior

DEBUG pq:init.py:372 No element found in queue before timeout (1.000 seconds).

Actual Behavior

DEBUG pq:init.py:372 timeout (1.000 seconds). self.logger.debug("timeout (%.3f seconds)." % timeout)

Steps to Reproduce the Problem

  1. run any job
  2. read debug

Specifications