daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Oct 18th, 2018 84 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. #!/bin/bash
  2.  
  3. queue="resque:queue:notifications"
  4.  
  5. # Replace with location pertinent to your setup.
  6. cd ~/src/digistore_new/administrators
  7.  
  8. had=`redis-cli llen $queue |sed 's/\([0-9]\+\)/$1/'`
  9.  
  10. # TODO: There must be a way to do this in one operation.
  11. redis-cli ltrim $queue 0 0 >/dev/null
  12. redis-cli lpop $queue >/dev/null
  13.  
  14. # Check for errors.
  15. now=`redis-cli llen $queue |sed 's/\([0-9]\+\)/$1/'`
  16. if [ "$now" != '0' ]
  17. then
  18.     2>&1 echo "Unable to empty queue $queue: ($now elements)"
  19.     2>&1 redis-cli lrange $queue 0 25
  20.     exit 1
  21. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top