From b5b5c7152681b887028d0f00ed0b3bf80c8a4ded Mon Sep 17 00:00:00 2001
From: Timothe Jost <timothe.jost@wanadoo.fr>
Date: Thu, 28 Mar 2024 23:59:03 +0100
Subject: [PATCH] selfish as a variable arg

---
 src/pypelines/__init__.py     | 2 +-
 src/pypelines/celery_tasks.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/pypelines/__init__.py b/src/pypelines/__init__.py
index 688ab70..c53d483 100644
--- a/src/pypelines/__init__.py
+++ b/src/pypelines/__init__.py
@@ -1,4 +1,4 @@
-__version__ = "0.0.43"
+__version__ = "0.0.44"
 
 from . import loggs
 from .pipes import *
diff --git a/src/pypelines/celery_tasks.py b/src/pypelines/celery_tasks.py
index 1d0bacd..4bcd1e5 100644
--- a/src/pypelines/celery_tasks.py
+++ b/src/pypelines/celery_tasks.py
@@ -374,7 +374,7 @@ def create_celery_app(conf_path, app_name="pypelines", v_host=None) -> "Celery |
     class tasks_infos(Task):
         name = f"{app_name}.tasks_infos"
 
-        def run(self, app_name):
+        def run(self, app_name, selfish=False):
             app = APPLICATIONS_STORE[app_name]
             tasks_dynamic_data = {}
             pipelines = getattr(app, "pipelines", {})
@@ -392,7 +392,7 @@ def create_celery_app(conf_path, app_name="pypelines", v_host=None) -> "Celery |
                                 "pipe_name": step.pipe_name,
                                 "pipeline_name": step.pipeline_name,
                                 "requires": [item.complete_name for item in step.requires],
-                                "step_level_in_pipe": step.get_level(selfish=False),
+                                "step_level_in_pipe": step.get_level(selfish=selfish),
                             }
                             tasks_dynamic_data[step.complete_name] = task_data
             return tasks_dynamic_data
-- 
GitLab