2016-05-28 19:21:02 +01:00
|
|
|
class DestroyProjectFromRepositoryJob < BaseActiveRecordJob
|
|
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options :queue => :low
|
2014-06-18 21:40:22 +01:00
|
|
|
|
2016-05-28 19:21:02 +01:00
|
|
|
def perform_with_ar_connection(project_id, repository_id)
|
|
|
|
project = Project.find(project_id)
|
|
|
|
repository = Repository.find(repository_id)
|
2014-06-19 20:35:53 +01:00
|
|
|
service = AbfWorkerService::Repository.new(repository)
|
|
|
|
service.destroy_project!(project)
|
2014-06-18 21:40:22 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|