- self.shared.queue.task_done()
- print 'load in run is', self.shared.load
- self.shared.load -= job['weight']
-
-class Shared:
- """
- Shared data between Service (front-end) and CIWorker (back-end).
-
- @member queue a list of dictionaries with the following keys:
- <ul>
- <li>raw_video</li>
- <li>name: a video name which must be a valid file name</li>
- <li>transcode_configs: a list of transcode configuration
- dictionaries having the keys as the parameters of
- api.BaseTranscoder.transcode(...)</li>
- <li>thumbs: string 'random' for extracting a thumbnail
- image from a random video position or a positive integer which
- represents the number of summary thumbnails to be extracted</li>
- </ul>
- @member load total weight of the jobs from the queue
- """
-
- def __init__(self):
- # Jobs queue.
- self.queue = Queue()