diff --git a/lib/travis/api/workers/build_cancellation.rb b/lib/travis/api/workers/build_cancellation.rb index be19d31b..adecf1ec 100644 --- a/lib/travis/api/workers/build_cancellation.rb +++ b/lib/travis/api/workers/build_cancellation.rb @@ -10,19 +10,8 @@ module Travis # do we need to name the queue here? we didn't do this in Admin. We passed this info in the procfile sidekiq_options queue: build_cancellations - attr_accessor :data - def perform(data) - @data = data - if payload - service.run - else - Travis.logger.warn("The #{type} payload was empty and could not be processed") - end - end - - def service - @service ||= Travis.service(:cancel_build, data) + Travis.service(:cancel_build, data).run end end end