Ignore:
Timestamp:
Jan 21, 2012, 2:17:07 PM (12 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
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)
Message:

Add restart job support to printer.py and job.py

File:
1 edited

Legend:

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

    rb8c3505 rc1cebbc  
    369369
    370370    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)
Note: See TracChangeset for help on using the changeset viewer.