Tasks
A task is just a regular Python function decorated with the task
decorator,
the functions can be also async
, Plombery will take care of everything:
Then pass the function names to the register_pipeline
function:
Input parameters
If the pipeline declares input parameters:
then the task function will receive those input parameters
via the params
argument:
Output data
In Plombery, pipelines execute their tasks sequentially and the return value of a task is considered its output data that is passed to the next ones as positional arguments:
@task
def task_1():
return 1
@task
def task_2(from_1):
# from_1 = 1
return from_1 + 1
@task
def task_3(from_1, from_2):
# from_1 = 1
# from_2 = 2
return from_1 + from_2
Logging
Plombery collects automatically pipelines logs and shows them on the UI:
To use this feature, you need to use a plombery's logger simply calling
the get_logger
function: