Skip to content

Userfunc

flowtask.components.UserFunc

UserFunc

UserFunc(loop=None, job=None, stat=None, **kwargs)

Bases: FlowComponent

UserFunc.

Overview

Run a arbitrary user function and return result

.. table:: Properties :widths: auto

+--------------+----------+-----------+-------------------------------------------------------+ | Name | Required | Summary | +--------------+----------+-----------+-------------------------------------------------------+ | function | Yes | Name function | +--------------+----------+-----------+-------------------------------------------------------+ | params | Yes | Allows you to set parameters | +--------------+----------+-----------+-------------------------------------------------------+ | foo | Yes | Variable name | +--------------+----------+-----------+-------------------------------------------------------+ | api_keys | Yes | Api password to query | +--------------+----------+-----------+-------------------------------------------------------+

Return the list of arbitrary days

close async

close()

Close Method.

run async

run()

Run Method.

start async

start(**kwargs)

Obtain Previous data.

getFunction

getFunction(program, function)

getFunction.

Example:

UserFunc:
  function: scheduling_visits
  args:
    max_distance: 400
    max_stores: 5
    year: 2024
    month: 11