mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 17:04:54 +01:00
do prevalidations in _publish_next_process
This commit is contained in:
parent
74496f899a
commit
0b396c2d1b
1 changed files with 21 additions and 1 deletions
|
|
@ -368,7 +368,27 @@ class PublisherController:
|
|||
self._trigger_callbacks(self._publishing_stopped_callback_refs)
|
||||
|
||||
def _publish_next_process(self):
|
||||
item = next(self._main_thread_iter)
|
||||
# Validations of progress before using iterator
|
||||
# - same conditions may be inside iterator but they may be used
|
||||
# only in specific cases (e.g. when it happens for a first time)
|
||||
|
||||
# There are validation errors and validation is passed
|
||||
# - can't do any progree
|
||||
if (
|
||||
self._publish_validated
|
||||
and self._publish_validation_errors
|
||||
):
|
||||
item = MainThreadItem(self._stop_publish)
|
||||
|
||||
# Any unexpected error happened
|
||||
# - everything should stop
|
||||
elif self._publish_error:
|
||||
item = MainThreadItem(self._stop_publish)
|
||||
|
||||
# Everything is ok so try to get new processing item
|
||||
else:
|
||||
item = next(self._main_thread_iter)
|
||||
|
||||
self._main_thread_processor.add_item(item)
|
||||
|
||||
def _publish_iterator(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue