Skip to content

Commit

Permalink
Debugging queue
Browse files Browse the repository at this point in the history
Will be used later to process a specific queue for debugging
  • Loading branch information
Audionut committed Nov 28, 2024
1 parent 29f35b6 commit dd481f9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,19 @@ async def do_the_thing(base_dir):

log_file = os.path.join(base_dir, "tmp", f"{meta['queue']}_queue.log")
allowed_extensions = ['.mkv', '.mp4', '.ts']

if path.endswith('.log') and meta['debug']:
console.print(f"[bold yellow]Processing debugging queue:[/bold yellow] [bold green{path}[/bold green]")
if os.path.exists(path):
log_file = path
with open(path, 'r') as f:
queue = json.load(f)
meta['queue'] = "debugging"

else:
console.print(f"[bold red]Log file not found: {path}. Exiting.[/bold red]")
exit(1)

if meta.get('queue'):
meta, help, before_args = parser.parse(tuple(' '.join(sys.argv[1:]).split(' ')), meta)
if os.path.exists(log_file):
Expand Down

0 comments on commit dd481f9

Please sign in to comment.