Skip to content

Responses

Background events

Returns the result of a background event processing.

reschedule(countdown = 30) classmethod

Returns a response as the extension wants to reschedule this task.

Parameters:

Name Type Description Default
countdown int

Optional amount of seconds before next delivery of this task (default to 30 seconds).

30

skip(output = None) classmethod

Returns a response as the extension wants to skip the processing of the received task.

Parameters:

Name Type Description Default
output str

Optional output message to set the reason of why this task has been skipped.

None

slow_process_reschedule(countdown = 300) classmethod

Returns a response as the extension wants to reschedule this task.

Parameters:

Name Type Description Default
countdown int

Optional amount of seconds before next delivery of this task (default to 300 seconds).

300

Note

The minumum amount of seconds to wait before this task will be redelivered is 300 seconds (5 minutes).

done(*args, **kwargs) classmethod

Create a new response as the task has been successfully processed.

fail(output = None) classmethod

Returns a response as the task has been successfully processed.

Parameters:

Name Type Description Default
output str

Optional output message to set the reason of failure within the task object.

None

Interactive events

Returns the result of an interactive event processing.

done(http_status = 200, headers = None, body = None) classmethod

Returns a response as the extension has successfully processed this interactive event.

Parameters:

Name Type Description Default
http_status int

Optional http status to return to the caller (default 200 -> ok).

200
headers Dict

Optional response headers to return to the caller.

None
body Dict

Optional response body to return to the caller.

None

fail(http_status = 400, headers = None, body = None, output = None) classmethod

Returns a response as the extension has failed to process this interactive event.

Parameters:

Name Type Description Default
http_status int

Optional http status to return to the caller (default 400 -> bad request).

400
headers Dict

Optional response headers to return to the caller.

None
body Dict

Optional response body to return to the caller.

None
output str

Optional output message to set within the task.

None

Scheduled execution

Returns the result of a scheduled event processing.

done(*args, **kwargs) classmethod

Create a new response as the task has been successfully processed.

fail(output = None) classmethod

Returns a response as the task has been successfully processed.

Parameters:

Name Type Description Default
output str

Optional output message to set the reason of failure within the task object.

None