hi guys with a prefect function task i can return ...
# prefect-community
s
hi guys with a prefect function task i can return a result simply with
return
like this:
Copy code
@task
def start_job():
   return job_id
i was wondering if it was possible to do the same for a container task created with
CreateContainer
in my case what i am trying to do is to return the job id of the job started by that container, so that another task can use it to stop the job
j
Hey @sark by job do you mean a job that the container is creating itself? I don’t think there is a way natively in those tasks to retrieve data returned from that container but we encourage contributions to the task library! As a side thought you may be able to use some combination of
GetContainerLogs
and
WaitOnContainer
to get the information you want but other than that it would have to be implemented.
s
yeah a job (unrelated to prefect) the container is creating itself
yeah i guess a container task is not something which can be treated as a function and so should not have a return value of that sort