Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on September 24, 2023 8:02PM
Likes: 0
Replies: 2
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.admin.DSSGeneralSettings.push_container_exec_base_images).
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
Worked like a charm! Thank you