Skip to content
Snippets Groups Projects
Commit ef07e9cf authored by drew's avatar drew Committed by drew stachon
Browse files

Remove allow_cancelling option from AuthJobFinder

This is behavior that we want to enable and allow at all times.
See #473376
parent 2db1a069
No related branches found
No related tags found
No related merge requests found
......@@ -6,10 +6,9 @@ class AuthJobFinder
ErasedJobError = Class.new(AuthError)
DeletedProjectError = Class.new(AuthError)
def initialize(token:, target_job: nil, allow_canceling: false)
def initialize(token:, target_job: nil)
@token = token
@target = target_job
@allow_canceling = allow_canceling
end
def execute!
......@@ -51,7 +50,7 @@ def validate_target_job!(job, target)
end
def validate_running_job!(job)
raise NotRunningJobError, 'Job is not running' unless job.running? || (@allow_canceling && job.canceling?)
raise NotRunningJobError, 'Job is not running' unless job.running? || job.canceling?
end
def validate_job_not_erased!(job)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment