https://prefect.io logo
m

Marco Petrazzoli

01/27/2021, 11:12 PM
I'm using something like:
Copy code
def say_hello():
    container = CreateContainer(
        image_name="nonexistentname",
    )
    StartContainer(container_id=container, docker_server_url="arandomtext")
    WaitOnContainer(container_id=container)
and it's always successful. Even with correct data i don't see my image executed
m

Mariia Kerimova

01/27/2021, 11:20 PM
hey Marco, just to clarify, do you provide any commands in CreateContainer task?
m

Marco Petrazzoli

01/27/2021, 11:28 PM
It's an image that automatically do things on start(python script)
z

Zanie

01/28/2021, 3:30 PM
It looks like you’ve got those in a function and not a flow? You’re just creating instances of classes, not running them.
Take a look at the docs at https://docs.prefect.io/core/getting_started/first-steps.html#task-classes — you initialize the Task classes then they call each other in a flow-context