Last active
January 13, 2024 17:10
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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