diff --git a/lib/Minion/Backend/Pg.pm b/lib/Minion/Backend/Pg.pm index 8f2e40f..a14af92 100644 --- a/lib/Minion/Backend/Pg.pm +++ b/lib/Minion/Backend/Pg.pm @@ -96,7 +96,7 @@ sub list_locks { my ($self, $offset, $limit, $options) = @_; my $locks = $self->pg->db->query( - 'SELECT name, EXTRACT(EPOCH FROM expires) AS expires, COUNT(*) OVER() AS total FROM minion_locks + 'SELECT id, name, EXTRACT(EPOCH FROM expires) AS expires, COUNT(*) OVER() AS total FROM minion_locks WHERE expires > NOW() AND (name = ANY ($1) OR $1 IS NULL) ORDER BY id DESC LIMIT $2 OFFSET $3', $options->{names}, $limit, $offset )->hashes->to_array; diff --git a/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep b/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep index 3cefe7e..a44f0a5 100644 --- a/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep +++ b/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep @@ -23,6 +23,7 @@ + Lock ID Name Expires @@ -37,6 +38,9 @@ + + <%= $lock->{id} %> + <%= $lock->{name} %>