Changeset c1cebbc for server/lib/gutenbach
- Timestamp:
- Jan 21, 2012, 2:17:07 PM (12 years ago)
- Branches:
- no-cups
- Children:
- 21b140d
- Parents:
- c500bc2
- git-author:
- Jessica B. Hamrick <jhamrick@…> (01/21/12 14:17:07)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (01/21/12 14:17:07)
- Location:
- server/lib/gutenbach/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/gutenbach/server/job.py
rb8c3505 rc1cebbc 369 369 370 370 def restart(self): 371 # XXX: Todo 372 pass 371 """Non-blocking restart. Job must be finished (see 372 'GutenbachJob.is_done'), and will be ready to be played (see 373 'GutenbachJob.is_ready') if this method is successful. 374 375 Raises 376 ------ 377 InvalidJobStateException 378 If the job is not done. 379 380 """ 381 382 if not self.is_done: 383 raise errors.InvalidJobStateException(self.state) 384 385 logger.debug("restarting job %d" % (self.id, self.document)) 386 387 self._why_done = None 388 self.spool(self.document) -
server/lib/gutenbach/server/printer.py
rc500bc2 rc1cebbc 402 402 pass 403 403 404 def restart_job(self): 405 pass 406 407 def promote_job(self, job_id): 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): 408 417 # According to RFC 3998, we need to put the job at the front 409 418 # of the queue (so that when the currently playing job
Note: See TracChangeset
for help on using the changeset viewer.