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
require "rubygems" | |
require "twitter" | |
require "json" | |
# things you must configure | |
TWITTER_USER = "your_username" | |
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
# get these from dev.twitter.com | |
CONSUMER_KEY = "your_consumer_key" |
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
# Root. | |
$ docker exec -u 0 i -t {container_id/image_name} bash | |
or | |
# Default container's user. | |
$ docker exec i -t {container_id/image_name} bash |
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
Sidekiq.redis { |conn| conn.flushdb } # clear everything | |
Sidekiq::Queue.all # get all queues | |
Sidekiq::Queue.new # get the "default" queue | |
Sidekiq::Queue.new("mailer") # get the "mailer" queue | |
Sidekiq::Queue.new.clear # deletes all jobs in a queue, by removing the queue | |
Sidekiq::Queue.all.each(&:clear) # deletes all jobs in all queues | |
ss = Sidekiq::ScheduledSet.new | |
ss.size |