Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/lib/gutenbach/server/printer.py

    r609a9b0 rc1cebbc  
    402402        pass
    403403
    404     def restart_job(self):
    405         pass
    406 
    407     def promote_job(self):
    408         pass
     404    def restart_job(self, job_id, requesting_user_name=None):
     405        job = self.get_job(job_id)
     406        try:
     407            job.restart()
     408        except InvalidJobStateException:
     409            # XXX
     410            raise ipp.errors.ClientErrorNotPossible
     411
     412        with self.lock:
     413            self.finished_jobs.remove(job_id)
     414            self.pending_jobs.append(job_id)
     415
     416    def promote_job(self, job_id, requesting_user_name=None):
     417        # According to RFC 3998, we need to put the job at the front
     418        # of the queue (so that when the currently playing job
     419        # completes, this one will go next
     420       
     421        job = self.get_job(job_id)
     422        job.priority = 1 # XXX we need to actually do something
     423                         # correct here
Note: See TracChangeset for help on using the changeset viewer.