Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

several queues depending on file size and preset #39

Open
egabancho opened this issue Feb 23, 2018 · 0 comments
Open

several queues depending on file size and preset #39

egabancho opened this issue Feb 23, 2018 · 0 comments

Comments

@egabancho
Copy link
Member

Right now we are sending all our jobs to the same queue:

CDS_SORENSON_DEFAULT_QUEUE = '064153dd-ade2-4824-8458-88e6ea03d395'

We could maybe change this into a dictionary with several queues and, depending on the file size and the preset send the job to different queues to expedite the creation of at least one preset to make video playable ASAP.

Maybe something like:

CDS_SORENSON_DEFAULT_QUEUE = {
  'default': '88b51dfc-fa33-4d0e-8ea0-934fc31dc4a2',
  'big_files': '064153dd-ade2-4824-8458-88e6ea03d395',
  'fast': '1ebcf592-0a17-42b8-a949-f1768935eadd',
}

def select_queue(preset_quality, **kwargs):
    if preset_quality == '480p':
        return CDS_SORENSON_DEFAULT_QUEUE['fast']
    elif kwargs['size'] > '20Gb':
        returnn CDS_SORENSON_DEFAULT_QUEUE['big_files']
    else:
       CDS_SORENSON_DEFAULT_QUEUE['default']
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant