zenstruck / messenger-monitor-bundle

Batteries included UI to monitor your Messenger workers, transports, schedules, and messages.
MIT License
153 stars 16 forks source link

Bugs with counting total messages processed #73

Open bendavies opened 7 months ago

bendavies commented 7 months ago

Hi Kevin,

There appears to be a problem with counting the total number of messages processed

image

because the query to do so looks like this:

  SELECT COUNT(p0_.finished_at) AS sclr_0 
    FROM processed_messages p0_ 
   WHERE p0_.finished_at >= ? 
     AND p0_.failure_type IS NOT NULL 
ORDER BY p0_.finished_at DESC

This query does not return a single count but instead a row for each finished message.

the correct query should be:

  SELECT COUNT(*) AS sclr_0 
    FROM processed_messages p0_ 
   WHERE p0_.finished_at >= ?
     AND p0_.failure_type IS NOT NULL;

Easy fix, but I'm having trouble seeing what the best fix is because of the use of the specification pattern. How would you like this fixed?

Thanks!

bendavies commented 7 months ago

think this was broken by https://github.com/zenstruck/messenger-monitor-bundle/commit/a4fc554d0e9a793f404e5f18767f7f4d06258d6d