Allow setting individual timeouts on scripts and reports

This commit is contained in:
kkthxbye-code
2022-04-04 18:00:38 +02:00
parent e2b6d69596
commit 36d6ae33d1
7 changed files with 25 additions and 8 deletions

View File

@@ -298,6 +298,10 @@ class BaseScript:
def module(cls):
return cls.__module__
@classproperty
def job_timeout(self):
return getattr(self.Meta, 'job_timeout', None)
@classmethod
def _get_vars(cls):
vars = {}
@@ -414,7 +418,7 @@ def is_variable(obj):
return isinstance(obj, ScriptVariable)
@job('default')
#@job('default')
def run_script(data, request, commit=True, *args, **kwargs):
"""
A wrapper for calling Script.run(). This performs error handling and provides a hook for committing changes. It