Documentation

The WorkplaceAPIOperator class

class workplace_operator.WorkplaceAPIOperator(recipientId, type_user, token, *args, **kwargs)[source]

Bases: airflow.models.baseoperator.BaseOperator

Airflow operator for Notify task whether its error or succeed

Parameters
  • recipientId (string) – workplace id group

  • type_user (string, optional) – profile user of operator usually group of people

  • token (string) – token id for credential in workplace

Raises

AirflowException – if workplace token id was empty not supplied

check_params()[source]

attribute for debugging by checking parameter of object

Returns

string text of token recipientId and type_user

Return type

string

execute(context)[source]

failed task notification

Parameters

context (notificationCallback: function) – callback context provide by airflow like on_failure_callback or on success callback

execute_success(context)[source]

success task notification

Parameters

context (notificationCallback: function) – callback context provide by airflow like on_failure_callback or on_success_callback

The WorkplaceAPIPostOperator class

class workplace_operator.WorkplaceAPIPostOperator(recipientId, type_user, token, **kwargs)[source]

Bases: workplace_operator.WorkplaceAPIOperator

just inherit from WorkplaceAPIOperator countering airflow bugs

Parameters
  • recipientId (string) – workplace id group

  • type_user (string, optional) – profile user of operator usually group of people

  • token (string) – token id for credential in workplace