# Keep tk-multi-publish2 UI from stalling during publish

**URL:** <https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046>\
**Category:** Pipeline Integrations\
**Created:** [March 21, 2023, 3:46pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046 "2023-03-21T15:46:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobi\_futurity](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tobi\_futurity](https://community.shotgridsoftware.com/u/tobi_futurity)\
**Post date:** [March 21, 2023, 3:46pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/1 "2023-03-21T15:46:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ricardo\_Musch](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ricardo_musch/32/405_2.png) [@Ricardo\_Musch](https://community.shotgridsoftware.com/u/Ricardo_Musch)\
**Post date:** [March 21, 2023, 6:52pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/2 "2023-03-21T18:52:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tobi\_futurity](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tobi\_futurity](https://community.shotgridsoftware.com/u/tobi_futurity)\
**Post date:** [March 22, 2023, 3:36pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/3 "2023-03-22T15:36:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ricardo\_Musch](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ricardo_musch/32/405_2.png) [@Ricardo\_Musch](https://community.shotgridsoftware.com/u/Ricardo_Musch)\
**Post date:** [March 22, 2023, 4:15pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/4 "2023-03-22T16:15:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tobi\_futurity](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tobi\_futurity](https://community.shotgridsoftware.com/u/tobi_futurity)\
**Post date:** [April 24, 2023, 10:00am UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/5 "2023-04-24T10:00:27Z")

</div>

Hi Ricardo,  
sorry for the late reply!  
I am currently using engine.show\_busy(). This works for now 🙂

Thank you,  
Tobi

---

<div class="post-metadata">

**Author:** ![mmoshev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mmoshev/32/476_2.png) [@mmoshev](https://community.shotgridsoftware.com/u/mmoshev)\
**Post date:** [April 24, 2023, 10:42am UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/6 "2023-04-24T10:42:30Z")

</div>

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](https://docs.python.org/dev/library/concurrent.futures.html#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.

---

<div class="post-metadata">

**Author:** ![tobi\_futurity](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tobi\_futurity](https://community.shotgridsoftware.com/u/tobi_futurity)\
**Post date:** [April 24, 2023, 12:59pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/7 "2023-04-24T12:59:47Z")

</div>

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

Best,  
Tobi

---

<div class="post-metadata">

**Author:** ![mmoshev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mmoshev/32/476_2.png) [@mmoshev](https://community.shotgridsoftware.com/u/mmoshev)\
**Post date:** [April 24, 2023, 1:11pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/8 "2023-04-24T13:11:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tobi\_futurity](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tobi\_futurity](https://community.shotgridsoftware.com/u/tobi_futurity)\
**Post date:** [April 24, 2023, 1:15pm UTC](https://community.shotgridsoftware.com/t/keep-tk-multi-publish2-ui-from-stalling-during-publish/17046/9 "2023-04-24T13:15:29Z")

</div>

Thanks,  
I’ll do that!

Best,  
Tobi
