Use different set of default luigi return codes.
@@ -27,6 +27,7 @@ def patch_all():
return
_patched = True
+ patch_default_retcodes()
patch_worker_run_task()
patch_worker_factory()
patch_keepalive_run()
@@ -35,6 +36,19 @@ def patch_all():
logger.debug("applied law-specific luigi patches")
+def patch_default_retcodes():
+ import luigi.retcodes
+
+ retcode = luigi.retcodes.retcode
+
+ retcode.already_running._default = 10
+ retcode.missing_data._default = 20
+ retcode.not_run._default = 30
+ retcode.task_failed._default = 40
+ retcode.scheduling_error._default = 50
+ retcode.unhandled_exception._default = 60
+
+
def patch_worker_run_task():
_run_task = luigi.worker.Worker._run_task
