Keep tk-multi-publish2 UI from stalling during publish

Hi all!
I am using tk-multi-publish2 as a standalone tool to publish assets.
During the publishing process, I am uploading files to a cloud storage solution. This takes a few seconds and during that time, the GUI becomes unresponsive and freezes.
Is there a built-in solution for that?

Best,
Tobi

If they are large files I would put them in a queue like Deadline.

Hi Ricardo, thanks for your reply.
Unfortunately, this is not possible because the publishing tool runs on many computers around the world and they are not part of our pipeline.

Best,
Tobi

Well since the delay is caused by the upload I’m not sure if there’s anything you can do about that.

perhaps some kind of async method to upload the file can be used so that the ui doesnt freeze but I’m not sure if thats even possible.

Hi Ricardo,
sorry for the late reply!
I am currently using engine.show_busy(). This works for now :slight_smile:

Thank you,
Tobi

No built-in solution for this, I’m afraid.
You can offload the upload to a separate thread. Perhaps the easiest would be a ThreadPoolExecutor.
Just do not interact with the ShotGrid API from the threads (or make new instances of the api). If you want to mark something in SG, use the result, returned from the threads.

Thanks for your reply!
I’m using bulkboto for the upload which uses threads by default.

Best,
Tobi

I see, then just use one additional thread to spawn the boto threads, to avoid blocking the UI.

Thanks,
I’ll do that!

Best,
Tobi