Skip to content

Commit f4f8f62

Browse files
committed
fix(handlers): handle zero queueable properly
Fixes issue #114 ofc...
1 parent 491e29d commit f4f8f62

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

resolve_proxy_encoder/queuer/handlers.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -380,18 +380,22 @@ def handle_final_queuable(jobs: list):
380380
TypeError: if media_list is not a list
381381
"""
382382

383+
logger.debug(f"[magenta]Final queueable:[/]\n{[x['file_name'] for x in jobs]}\n")
384+
383385
if len(jobs) == 0:
384386

385387
global SOME_ACTION_TAKEN
386388
if not SOME_ACTION_TAKEN:
387389

388390
pprint(
389-
"[green]Looks like all your media is already linked.[/]\n"
391+
"\n[green]Looks like all your media is already linked.[/]\n"
390392
"[magenta italic]If you want to re-rerender proxies, unlink them within Resolve and try again."
391393
)
392-
393394
core.app_exit(0, -1)
394395

396+
pprint("[bold][green]All linked up![/bold] Nothing to queue[/] :link:")
397+
core.app_exit(0, -1)
398+
395399
# Final Prompt confirm
396400
if not Confirm.ask(
397401
f"[bold][green]Go time![/bold] {len(jobs)} to queue. Sound good?[/]"

resolve_proxy_encoder/queuer/link.py

+1
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def link_proxies_with_mpi(media_list):
282282

283283
media_list = [x for x in media_list if x not in link_success]
284284

285+
logger.debug(f"[magenta]Remaining unlinked media: {media_list}")
285286
return media_list
286287

287288

resolve_proxy_encoder/queuer/queue.py

+3
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,15 @@ def main():
9999
# Prompt user for intervention if necessary
100100
print()
101101
jobs = handlers.handle_already_linked(jobs, unlinked_types=["Offline", "None"])
102+
logger.debug(f"[magenta]Remaining queuable:[/]\n{[x['file_name'] for x in jobs]}")
102103

103104
print()
104105
jobs = handlers.handle_existing_unlinked(jobs, unlinked_types=["Offline", "None"])
106+
logger.debug(f"[magenta]Remaining queuable:[/]\n{[x['file_name'] for x in jobs]}")
105107

106108
print()
107109
jobs = handlers.handle_offline_proxies(jobs)
110+
logger.debug(f"[magenta]Remaining queuable:[/]\n{[x['file_name'] for x in jobs]}")
108111

109112
# Remove unhashable PyRemoteObj
110113
for job in jobs:

0 commit comments

Comments
 (0)