Skip to content

Instantly share code, notes, and snippets.

@KuJoe
Last active January 13, 2024 17:10
Show Gist options
  • Save KuJoe/b1ae1a69ead38a62172ab06b68c99902 to your computer and use it in GitHub Desktop.
Save KuJoe/b1ae1a69ead38a62172ab06b68c99902 to your computer and use it in GitHub Desktop.
Get the number of enqueued Sidekiq jobs from the pull queue using PHP and Redis
<?php
$redis = new Redis();
$redis->connect('<redis_server_hostname>', <port>);
$queue_name = 'queue:pull';
$queue_length = $redis->llen($queue_name);
echo "Number of enqueued jobs in '$queue_name': $queue_length";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment