is there a way to give docker tasks a name?
# ask-community
z
is there a way to give docker tasks a name?
k
Hey @Zach Schumacher, I believe these tasks take **kwargs arguments that take in whatever argument the base Task class has. You can try
CreateContainer(name="Task name")
z
it does work at that level, would be nice if
__call__
also took name, tho. e.g.
container_task = ContainerTask(name="sup")
works, however
container_task(name="sup")
does not.
i can probs just subclass or something and itll do what i want, just wanted to check if i was missing anything!
k
This is because
name
is a build time thing, whereas
container_task(name="sup")
would be a runtime thing. Naming tasks has to be a build time operation because it’s part of the metadata in constructing the DAG.
So the
name
needs to be passed during
init
z
yeah, that makes sense