* adding ability to run everything within jam-web for jobs
This commit is contained in:
parent
873037101c
commit
3d453468f2
|
|
@ -11,13 +11,10 @@ module JamRuby
|
||||||
class IcecastSourceCheck
|
class IcecastSourceCheck
|
||||||
extend Resque::Plugins::LonelyJob
|
extend Resque::Plugins::LonelyJob
|
||||||
|
|
||||||
|
|
||||||
@queue = :icecast_source_check
|
@queue = :icecast_source_check
|
||||||
|
|
||||||
|
|
||||||
@@log = Logging.logger[IcecastSourceCheck]
|
@@log = Logging.logger[IcecastSourceCheck]
|
||||||
|
|
||||||
|
|
||||||
def self.perform
|
def self.perform
|
||||||
@@log.debug("waking up")
|
@@log.debug("waking up")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1,13 @@
|
||||||
Resque.redis = Rails.application.config.redis_host
|
Resque.redis = Rails.application.config.redis_host
|
||||||
|
|
||||||
|
|
||||||
|
if !$rails_rake_task && Rails.env == 'development' && ENV['RUN_JOBS_INLINE'] == '1'
|
||||||
|
|
||||||
|
Thread.new do
|
||||||
|
system('INTERVAL=1 bundle exec rake all_jobs')
|
||||||
|
end
|
||||||
|
|
||||||
|
Thread.new do
|
||||||
|
system('bundle exec rake scheduler')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -71,6 +71,14 @@ SampleApp::Application.routes.draw do
|
||||||
# email update
|
# email update
|
||||||
match '/confirm_email' => 'users#finalize_update_email', :as => 'confirm_email' # NOTE: if you change this, you break outstanding email changes because links in user inboxes are broken
|
match '/confirm_email' => 'users#finalize_update_email', :as => 'confirm_email' # NOTE: if you change this, you break outstanding email changes because links in user inboxes are broken
|
||||||
|
|
||||||
|
# embed resque-web if this is development mode
|
||||||
|
if Rails.env == "development"
|
||||||
|
require 'resque/server'
|
||||||
|
require 'resque-retry'
|
||||||
|
require 'resque-retry/server'
|
||||||
|
mount Resque::Server.new, :at => "/resque" if Rails.env == "development"
|
||||||
|
end
|
||||||
|
|
||||||
scope '/corp' do
|
scope '/corp' do
|
||||||
match '/about', to: 'corps#about', as: 'corp_about'
|
match '/about', to: 'corps#about', as: 'corp_about'
|
||||||
match '/contact', to: 'corps#contact', as: 'corp_contact'
|
match '/contact', to: 'corps#contact', as: 'corp_contact'
|
||||||
|
|
@ -324,4 +332,5 @@ SampleApp::Application.routes.draw do
|
||||||
match '/icecast/listener_add' => 'api_icecast#listener_add', :via => :post
|
match '/icecast/listener_add' => 'api_icecast#listener_add', :via => :post
|
||||||
match '/icecast/listener_remove' => 'api_icecast#listener_remove', :via => :post
|
match '/icecast/listener_remove' => 'api_icecast#listener_remove', :via => :post
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue