New UI exit cleanup trigger makes worker thread die because colab runs with no UI
Implement a better way to do non-UI and graceful thread shutdown.
ERROR | 2024-03-19 15:29:10.825471 | __main__:main:22 - An error has been caught in function 'main', process 'MainProcess' (4553), thread 'MainThread' (138685003399168):
Traceback (most recent call last):
File "/content/AI-Horde-Worker/horde_scribe_bridge.py", line 31, in <module>
main()
└ <function main at 0x7e221e24bd90>
> File "/content/AI-Horde-Worker/horde_scribe_bridge.py", line 22, in main
worker.start()
│ └ <function ScribeWorker.start at 0x7e221bd81870>
└ <worker.scribe_worker.ScribeWorker object at 0x7e221bd5c550>
File "/content/AI-Horde-Worker/worker/scribe_worker.py", line 84, in start
if not self.ui.is_alive():
│ └ None
└ <worker.scribe_worker.ScribeWorker object at 0x7e221bd5c550>
AttributeError: 'NoneType' object has no attribute 'is_alive'
Traceback (most recent call last):
File "/content/AI-Horde-Worker/horde_scribe_bridge.py", line 31, in <module>
main()
File "/content/AI-Horde-Worker/horde_scribe_bridge.py", line 22, in main
worker.start()
File "/usr/local/lib/python3.10/dist-packages/loguru/_logger.py", line 1277, in catch_wrapper
return function(*args, **kwargs)
File "/content/AI-Horde-Worker/worker/scribe_worker.py", line 84, in start
if not self.ui.is_alive():
AttributeError: 'NoneType' object has no attribute 'is_alive'
New UI exit cleanup trigger makes worker thread die because colab runs with no UI
Implement a better way to do non-UI and graceful thread shutdown.