This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start logic for retreiving cancellation tasks
- Loading branch information
Showing
4 changed files
with
68 additions
and
12 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
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
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export const getCancellationRequestIds = requestsWithTasks => { | ||
const cancellationRequestIds = []; | ||
for (const request of requestsWithTasks) { | ||
for (const task of request.miq_request_tasks) { | ||
if (task.options.cancellation_request_id) { | ||
cancellationRequestIds.push(task.options.cancellation_request_id); | ||
} | ||
} | ||
} | ||
// to return a mock cancellation task, just return a request that you know exists... | ||
// return [{ href: 'http://0.0.0.0:8080/api/requests/3' }]; | ||
return cancellationRequestIds; | ||
}; |