6. Api package¶
Package for work with API.
6.1. Api.views¶
-
api.views.
is_finished
(run_id, card_id, cur_counter, last, run_parallel)[source]¶ Function to determine the last card in a running list of cards.
Arguments: - run_id: run id
- card_id: card id
- cur_counter: the current cards position in the running list of cards
- last: the last position in the running list of cards
- run_parallel: boolean value that parallel card opledelyaet running or sequentially
-
api.views.
set_state_fail
(obj, state)[source]¶ Set a card execution status if it does not ‘fail’.
Arguments: - obj: card object
- state: the current status of the card
-
api.views.
update_run
(*args, **kwargs)[source]¶ Update the status of the card.
The function receives the request and the card data. If the launched the card is last, the process stops.
Arguments: - request: request
- run_id: card details. Presented as a string: <run_id>.<card_sequence_id>.<order_card_item_id>.<current_position>.<the_last_card_number>