Login
Back to bricks list
Introduction Version

ConfigParams

Config values send to the task

Functions

GET_VALUE

Returns the value of a parameter by its name.

This is different from get method. If the param doesn't exist or its value is None, it returns the default_value. It considers None as not defined. The get method only returns the default value if the param does not exists. It considers None as defined

Parameters:
NameTypeDefault valueDescription
param_namestr
default_valueAny
Return type:
Any
SAVE_PARAMS

Special method to update the config during the task run. The update is directly saved in the database /!\ To use with caution, only when you know what you are doing /!

SET_CONFIG
Parameters:
NameTypeDefault valueDescription
configConfig
SET_CONFIG_MODEL_ID
Parameters:
NameTypeDefault valueDescription
config_model_idstr
SET_VALUE

Set the value of a parameter by its name.

Parameters:
NameTypeDefault valueDescription
param_namestr
valueAny The value of the parameter
VALUE_IS_SET

Test if a parameter exists and is not none

Parameters:
NameTypeDefault valueDescription
param_namestr
Return type:
bool
FROM_CONFIG - @classmethod

Create a config params from a config

Parameters:
NameTypeDefault valueDescription
configConfig
Return type:
ConfigParams