Class: Ci::RunScheduledBuildService
- Inherits:
-
Object
- Object
- Ci::RunScheduledBuildService
- Defined in:
- app/services/ci/run_scheduled_build_service.rb
Instance Attribute Summary collapse
-
#build ⇒ Object
readonly
Returns the value of attribute build.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(build) ⇒ RunScheduledBuildService
constructor
A new instance of RunScheduledBuildService.
Constructor Details
#initialize(build) ⇒ RunScheduledBuildService
Returns a new instance of RunScheduledBuildService.
5 6 7 |
# File 'app/services/ci/run_scheduled_build_service.rb', line 5 def initialize(build) @build = build end |
Instance Attribute Details
#build ⇒ Object (readonly)
Returns the value of attribute build.
15 16 17 |
# File 'app/services/ci/run_scheduled_build_service.rb', line 15 def build @build end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 |
# File 'app/services/ci/run_scheduled_build_service.rb', line 9 def execute raise Gitlab::Access::AccessDeniedError unless Ability.allowed?(build.user, :play_job, build) build.enqueue_scheduled! end |