Sha256: 74c3c84279dd184c8e5d7589ce5d45b779db363134949405e1bcd89f25729fca
Contents?: true
Size: 1.03 KB
Versions: 9
Compression:
Stored size: 1.03 KB
Contents
Standup.script :node do def run scripts.redis.install_from_resque if sudo('find /etc/init.d/redis-server').match(/No such file or directory/).present? path_to_resque_exec = "#{scripts.webapp.app_path}/script/resque" with_processed_file script_file('resque') do |file| upload file, :to => path_to_resque_exec, :sudo => true end sudo "chown www-data:www-data #{path_to_resque_exec}" sudo "chmod +x #{path_to_resque_exec}" sudo "mkdir #{scripts.webapp.app_path}/tmp/pids" sudo "chown www-data:www-data #{scripts.webapp.app_path}/tmp/pids" with_processed_file script_file('resque_monit.conf') do |file| scripts.monit.add_watch file end restart end def restart ((scripts.webapp.params.has_key?(:resque_queues) && scripts.webapp.params.resque_queues.presence) || {"ALL_QUEUES" => 1 }).each_pair do |queue_name, num_of_workers| 1.upto(num_of_workers) do |num| scripts.monit.restart_watch "resque_#{queue_name}_#{num}" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems