Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
I was looking at using push_container_exec_base_images() in connection with some other steps to work on building and updating some base images for Dataiku using the Python API (https://developer.dataiku.com/latest/api-reference/python/other-administration.html#dataikuapi.dss.a...).
The method appears to be non-blocking: I imagine it triggers the image pushes but returns control immediately. What is a good way to check if the base image push process has successfully completed before continuing on in the script? Currently, I simply sleep in my script for 10 minutes, but a more efficient method would be ideal
Thanks,
Yash
Hi @yashpuranik,
Instead of using DSSGeneralSettings.push_container_exec_base_images, you can use DSSClient.push_base_images, which returns a DSSFuture object that you can wait on.
Example:
import dataiku
client = dataiku.api_client()
# Start pushing the base images
future = client.push_base_images()
# Wait for the push to complete, and get the result
result = future.wait_for_result()
Thanks,
Zach
Hi @yashpuranik,
Instead of using DSSGeneralSettings.push_container_exec_base_images, you can use DSSClient.push_base_images, which returns a DSSFuture object that you can wait on.
Example:
import dataiku
client = dataiku.api_client()
# Start pushing the base images
future = client.push_base_images()
# Wait for the push to complete, and get the result
result = future.wait_for_result()
Thanks,
Zach
Worked like a charm! Thank you ๐