Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove resque tasks and scripts

  • Loading branch information...
commit 0ab8359f4c83438565f9f5fe14f64e860616f8c7 1 parent ffaf5f8
Martin Fenner authored
View
3  lib/tasks/resque.rake
@@ -1,3 +0,0 @@
-require 'resque/tasks'
-
-task "resque:setup" => :environment
View
34 script/resque_scheduler
@@ -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
35 script/resque_worker
@@ -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
-})
Please sign in to comment.
Something went wrong with that request. Please try again.