Skip to content

Tasks

Celery tasks.

run(self, *args, **kwargs)

Run a command inside a celery task.

Accepts the same arguments as proc.process.ManagedProcess.

Source code in dvc_task/proc/tasks.py
10
11
12
13
14
15
16
17
18
@shared_task(bind=True)
def run(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
    """Run a command inside a celery task.

    Accepts the same arguments as `proc.process.ManagedProcess`.
    """
    with ManagedProcess(*args, **kwargs) as proc:
        pass
    return proc.info.asdict()