TriggeredJobModel
Model for a triggered job configuration.
A triggered job can execute a Task, Protocol, or ScenarioTemplate based on a trigger (CRON schedule or WEBHOOK call).
config_values: dictcron_expression: strdescription: stris_active: boolname: strnext_run_at: datetimeprocess_typing: Typingscenario_template: ScenarioTemplatetrigger_type: TriggerTypeInitialize self. See help(type(self)) for accurate signature.
Calculate the next run time based on cron_expression
datetime.datetime | Nonebool - Truebool - Falsebool - Falsebool - Truebool - FalseGet the last run of this job
TriggeredJobRunModel | NoneGet the status of the last run
gws_core.triggered_job.triggered_job_types.JobStatus | NoneCheck if this is a CRON triggered job
boolCheck if a run is currently in progress
boolReturns True if the model is saved in db, False otherwise
boolModelTypeSets the data
set force_insert to True to force creation of the object
set skip_hook to True to skip the before insert or update hook
ModelTypeModelWithUserDTOUpdate next_run_at based on cron_expression
Check if this job uses a Task/Protocol typing
boolCheck if this job uses a ScenarioTemplate
boolAnyMethod call after all the table are inited
Useful when use DeferredForeignKey to create the foreign key manually latter
Method call after the table is created
Usefull to create the full text indexes
AnyAnybool - Truebool - TrueAnyAnybool - Truebool - TrueAnyAnyAnyAnyAnyReturns the name of the class
bool - Falsebool - Falsebool - FalsestrReturns True if the column exists in the table
strboolAnyCreate a foreign key for a Foreign key field only if the foreign key does not exists
ForeignKeyFieldMethod to create a full text index
liststrCreate model table
Drop model table
Execute a raw SQL query. Can use the [TABLE_NAME] to replace by the table name
strAnyAnystrboolReturns the full name of the class
bool - Falsebool - FalsestrAnyAnyGet all active CRON jobs that should run (next_run_at <= now)
datetimelistGet all active jobs
liststrOptionalGet by ID and throw 404 error if object not found
strModelTypelistlistGet a job by its process typing
TypingTriggeredJobModel | NoneGet a job by its process typing name
strTriggeredJobModel | NoneDatabaseProxyReturns the (current) DbManager of this model
AbstractDbManagerModelMetadataAnyAnyReturns the table name of this class
str | NoneAnyReturns True if the index exists in the table
strboolGet all the classes that inherit this class
listAnyAnyAnyAnyAnyAnyReturns True if the class has a table name defined
boolAnyAnyAnyAnyAnyAnyPerforms full-text search on the field. Must be overrided by child class to work
strstr | NoneModelSelectAnyAnyAnyAnyAnyAnyAny