2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-04-18 15:26:56 -04:00
|
|
|
class ExpirePipelineCacheWorker
|
2017-11-28 11:08:30 -05:00
|
|
|
include ApplicationWorker
|
2017-04-18 15:26:56 -04:00
|
|
|
include PipelineQueue
|
|
|
|
|
2017-11-28 11:16:50 -05:00
|
|
|
queue_namespace :pipeline_cache
|
2017-08-21 08:02:20 -04:00
|
|
|
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2017-04-20 02:44:01 -04:00
|
|
|
def perform(pipeline_id)
|
2017-04-21 11:39:19 -04:00
|
|
|
pipeline = Ci::Pipeline.find_by(id: pipeline_id)
|
|
|
|
return unless pipeline
|
|
|
|
|
2019-04-12 15:29:47 -04:00
|
|
|
Ci::ExpirePipelineCacheService.new.execute(pipeline)
|
2017-04-18 15:26:56 -04:00
|
|
|
end
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2017-04-18 15:26:56 -04:00
|
|
|
end
|