Revert to delayed_job from sneakers
parent
5649d107cd
commit
1c07b06daa
1
Gemfile
1
Gemfile
|
@ -25,7 +25,6 @@ gem "webpack-rails"
|
|||
# vars if you wish to use them on your own servers.
|
||||
gem "rollbar"
|
||||
gem "skylight", "1.4.0"
|
||||
gem "sneakers"
|
||||
|
||||
group :development, :test do
|
||||
gem "codecov", require: false
|
||||
|
|
14
Gemfile.lock
14
Gemfile.lock
|
@ -60,12 +60,9 @@ GEM
|
|||
tzinfo (~> 1.1)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
amq-protocol (2.2.0)
|
||||
arel (8.0.0)
|
||||
bcrypt (3.1.11)
|
||||
builder (3.2.3)
|
||||
bunny (2.7.1)
|
||||
amq-protocol (>= 2.2.0)
|
||||
case_transform (0.2)
|
||||
activesupport
|
||||
choice (0.2.0)
|
||||
|
@ -231,9 +228,6 @@ GEM
|
|||
rspec-support (~> 3.5.0)
|
||||
rspec-support (3.5.0)
|
||||
ruby-graphviz (1.2.3)
|
||||
serverengine (1.5.11)
|
||||
sigdump (~> 0.2.2)
|
||||
sigdump (0.2.4)
|
||||
simplecov (0.15.1)
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
|
@ -241,11 +235,6 @@ GEM
|
|||
simplecov-html (0.10.2)
|
||||
skylight (1.4.0)
|
||||
activesupport (>= 3.0.0)
|
||||
sneakers (2.6.0)
|
||||
bunny (~> 2.7.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
serverengine (~> 1.5.11)
|
||||
thor
|
||||
sprockets (3.7.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
|
@ -304,7 +293,6 @@ DEPENDENCIES
|
|||
simplecov
|
||||
skylight (= 1.4.0)
|
||||
smarf_doc!
|
||||
sneakers
|
||||
thin
|
||||
tzinfo
|
||||
webpack-rails
|
||||
|
@ -313,4 +301,4 @@ RUBY VERSION
|
|||
ruby 2.4.2p198
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.0.pre.3
|
||||
1.16.0
|
||||
|
|
|
@ -4,9 +4,7 @@ class AutoSyncJob < ApplicationJob
|
|||
def perform(broadcast_payload, id, channel, created_at_utc_integer)
|
||||
wayback = Time.at(created_at_utc_integer).utc
|
||||
mins = ((wayback - Time.now.utc) / 1.minute).round
|
||||
host1 = Transport.connection.host
|
||||
host2 = Transport::AMQP_URL
|
||||
Rollbar.info("Investigating bad URL", { host1: host1, host2: host2 })
|
||||
|
||||
Transport.amqp_send(broadcast_payload, id, channel) if (mins < 2)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -40,11 +40,9 @@ class ApplicationRecord < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def broadcast!
|
||||
puts "`broadcast!` is stubbed"
|
||||
# AutoSyncJob.perform_later({}, 2, "sync.Device.3", Time.now.utc.to_i)
|
||||
# AutoSyncJob.perform_later(broadcast_payload,
|
||||
# Device.current.id,
|
||||
# chan_name,
|
||||
# Time.now.utc.to_i)
|
||||
AutoSyncJob.perform_later(broadcast_payload,
|
||||
Device.current.id,
|
||||
chan_name,
|
||||
Time.now.utc.to_i)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ Bundler.require(:default, Rails.env)
|
|||
module FarmBot
|
||||
class Application < Rails::Application
|
||||
|
||||
config.active_job.queue_adapter = :sneakers
|
||||
config.active_job.queue_adapter = :delayed_job
|
||||
config.action_dispatch.perform_deep_munge = false
|
||||
I18n.enforce_available_locales = false
|
||||
config.generators do |g|
|
||||
|
@ -34,10 +34,5 @@ module FarmBot
|
|||
Rails.application.routes.default_url_options[:port] = ENV["API_PORT"] || 3000
|
||||
# ¯\_(ツ)_/¯
|
||||
$API_URL = "//#{ Rails.application.routes.default_url_options[:host] }:#{ Rails.application.routes.default_url_options[:port] }"
|
||||
|
||||
Sneakers.configure(amqp: 'amqp://localhost',
|
||||
vhost: '/',
|
||||
exchange: 'sneakers',
|
||||
exchange_type: :direct)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue