def save(self): if not self.id: self.id = utils.random_id() if self.file and not self.thumb: if self.mimetype.startswith('image'): options = {"width":settings.thumbsize[0],"height":settings.thumbsize[1]} thumboutput.delay([self.id],[],options) if self.mimetype.startswith('video'): options = {"width":settings.thumbsize[0],"height":settings.thumbsize[1]} thumbvideooutput.delay([self.id],[],options) super(JobOutput, self).save()
def save(self): if not self.id: self.id = utils.random_id() if self.taskset_id: tsr = TaskSetResult.restore(self.taskset_id) if tsr is not None and hasattr(tsr,"taskset_id"): subtasks = tsr.subtasks if subtasks: for st in subtasks: jasr = JobASyncResult(async_id=st.task_id,job=self) jasr.save() super(Job, self).save()