diff --git a/docs/source/user_guide/configuration_options.rst b/docs/source/user_guide/configuration_options.rst index 9457f107c..90693f580 100644 --- a/docs/source/user_guide/configuration_options.rst +++ b/docs/source/user_guide/configuration_options.rst @@ -627,6 +627,7 @@ Configure workers that process units of work - Run a worker using Kubernetes * - ``--work-python`` - Run a worker using a Python plugin + [DEPRECATION WARNING] This option is not currently being used. This feature will be removed from receptor in a future release * - ``--work-signing`` - Private key to sign work submissions * - ``--work-verification`` @@ -720,7 +721,7 @@ Work Kubernetes Work Python ^^^^^^^^^^^ -.. list-table:: Work Python +.. list-table:: Work Python [DEPRECATION WARNING] This option is not currently being used. This feature will be removed from receptor in a future release :header-rows: 1 :widths: auto diff --git a/pkg/workceptor/python.go b/pkg/workceptor/python.go index bc4124a2d..05279bfdc 100644 --- a/pkg/workceptor/python.go +++ b/pkg/workceptor/python.go @@ -5,6 +5,7 @@ package workceptor import ( "encoding/json" + "errors" "fmt" "os/exec" @@ -21,6 +22,7 @@ type pythonUnit struct { // Start launches a job with given parameters. func (pw *pythonUnit) Start() error { + pw.UpdateBasicStatus(WorkStatePending, "[DEPRECATION WARNING] This option is not currently being used. This feature will be removed from receptor in a future release.", 0) pw.UpdateBasicStatus(WorkStatePending, "Launching Python runner", 0) config := make(map[string]interface{}) for k, v := range pw.config { @@ -72,10 +74,12 @@ func (cfg workPythonCfg) NewWorker(_ BaseWorkUnitForWorkUnit, w *Workceptor, uni func (cfg workPythonCfg) Run() error { err := MainInstance.RegisterWorker(cfg.WorkType, cfg.NewWorker, false) - return err + errWithDeprecation := errors.Join(err, errors.New("[DEPRECATION WARNING] This option is not currently being used. This feature will be removed from receptor in a future release")) + + return errWithDeprecation } func init() { cmdline.RegisterConfigTypeForApp("receptor-workers", - "work-python", "Run a worker using a Python plugin", workPythonCfg{}, cmdline.Section(workersSection)) + "work-python", "Run a worker using a Python plugin\n[DEPRECATION WARNING] This option is not currently being used. This feature will be removed from receptor in a future release.", workPythonCfg{}, cmdline.Section(workersSection)) }