Permalink
Browse files

Remove resque tasks and scripts

  • Loading branch information...
1 parent ffaf5f8 commit 0ab8359f4c83438565f9f5fe14f64e860616f8c7 Martin Fenner committed Apr 6, 2012
Showing with 0 additions and 72 deletions.
  1. +0 −3 lib/tasks/resque.rake
  2. +0 −34 script/resque_scheduler
  3. +0 −35 script/resque_worker
@@ -1,3 +0,0 @@
-require 'resque/tasks'
-
-task "resque:setup" => :environment
@@ -1,34 +0,0 @@
-#!/usr/bin/env ruby
-
-ENV['RAILS_ENV'] ||= 'development'
-APP_PATH = File.expand_path('../../config/application', __FILE__)
-require File.expand_path('../../config/boot', __FILE__)
-require File.expand_path('../../config/environment', __FILE__)
-require 'daemon_spawn'
-require 'resque'
-require 'resque_scheduler'
-
-if ENV['RAILS_ENV'] == "development"
- pid_file = File.expand_path("tmp/resque_worker.pid")
-else
- pid_file = File.expand_path("../../shared/pids/resque_worker.pid")
-end
-
-class ResqueSchedulerDaemon < DaemonSpawn::Base
- def start(args)
- Resque::Scheduler.verbose = true
- Resque::Scheduler.run
- end
-
- def stop
- Resque::Scheduler.shutdown
- end
-end
-
-ResqueSchedulerDaemon.spawn!({
- :log_file => File.expand_path("log/resque_scheduler.log"),
- :pid_file => File.expand_path("../../shared/pids/resque_scheduler.pid"),
- :sync_log => true,
- :working_dir => File.expand_path("../../", __FILE__),
- :singleton => true
-})
View
@@ -1,35 +0,0 @@
-#!/usr/bin/env ruby
-
-ENV['RAILS_ENV'] ||= 'development'
-APP_PATH = File.expand_path('../../config/application', __FILE__)
-require File.expand_path('../../config/boot', __FILE__)
-require File.expand_path('../../config/environment', __FILE__)
-require 'daemon_spawn'
-require 'resque'
-
-if ENV['RAILS_ENV'] == "development"
- pid_file = File.expand_path("tmp/resque_worker.pid")
-else
- pid_file = File.expand_path("../../shared/pids/resque_worker.pid")
-end
-
-class ResqueWorkerDaemon < DaemonSpawn::Base
- def start(args)
- @worker = Resque::Worker.new('*') # Specify which queues this worker will process
- @worker.verbose = 1 # Logging - can also set vverbose for 'very verbose'
- @worker.work
- end
-
- def stop
- @worker.try(:shutdown)
- end
-end
-
-ResqueWorkerDaemon.spawn!({
- :processes => ENV['RAILS_ENV'] == "development" ? 1 : 5,
- :log_file => File.expand_path("log/resque_worker.log"),
- :pid_file => pid_file,
- :sync_log => true,
- :working_dir => File.expand_path("../../", __FILE__),
- :singleton => true
-})

0 comments on commit 0ab8359

Please sign in to comment.