refactor buildcancellation worker
This commit is contained in:
parent
39bd25cc3b
commit
cab128f06e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user