-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
module Api | ||
class RequestTasksController < BaseController | ||
include Api::Mixins::ResourceCancel | ||
|
||
# NOTE: deliver setups the workflow and puts into the queue | ||
# execute does the actual work (called from the workflow) | ||
def execute_resource(type, id, data) | ||
api_resource(type, id, "Executing") do |task| | ||
task.execute_queue | ||
end | ||
end | ||
|
||
# this kicks off the workflow surrounding this request | ||
# for an automate/workflow task, | ||
def deliver_resource(type, id, data) | ||
api_resource(type, id, "Executing") do |task| | ||
task.deliver_queue | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters