app/cyclid/plugins/dispatcher/local.rb in cyclid-0.3.3 vs app/cyclid/plugins/dispatcher/local.rb in cyclid-0.4.0

- old
+ new

@@ -68,10 +68,18 @@ health_status(:ok, 'sidekiq is okay') end end + # Plugin metadata + def self.metadata + super.merge!(version: Cyclid::Api::VERSION, + license: 'Apache-2.0', + author: 'Liqwyd Ltd.', + homepage: 'http://docs.cyclid.io') + end + # Register this plugin register_plugin 'local' end # A Runner may be running locally (within the API application context) @@ -131,11 +139,12 @@ module Worker # Local Sidekiq based worker class Local include Sidekiq::Worker - sidekiq_options retry: false + sidekiq_options retry: false, + queue: 'cyclid_jobs' # Run a job Runner asynchronously def perform(job, job_id, callback_object) begin # Unserialize the callback object, if there is one @@ -149,10 +158,12 @@ begin runner = Cyclid::API::Job::Runner.new(job_id, job, notifier) success = runner.run rescue StandardError => ex - Cyclid.logger.error "job runner failed: #{ex}" + Cyclid.logger.error "local Sidekiq Worker failed: #{ex}" + Cyclid.logger.debug ex.backtrace.join("\n") + success = false end # Notify completion notifier.completion(success)