addons14/queue_job/job.py
def perform(self):
        """Execute the job.

        The job is executed with the user which has initiated it.
        """
        self.retry += 1
        try:
            self.result = self.func(*tuple(self.args), **self.kwargs)
        except RetryableJobError as err:
            if err.ignore_retry:
                self.retry -= 1
                raise
            elif not self.max_retries:  # infinite retries
                raise
            elif self.retry >= self.max_retries:
                type_, value, traceback = sys.exc_info()
                # change the exception type but keep the original
                # traceback and message:
                # http://blog.ianbicking.org/2007/09/12/re-raising-exceptions/
                new_exc = FailedJobError(
                    "Max. retries (%d) reached: %s" % (self.max_retries, value or type_)
                )
                raise new_exc from err
            raise
        return self.result
Execute the job.

        The job is executed with the user which has initiated it.
        
Execute the job.
The job is executed with the user which has initiated it.
Execute the job . The job is executed with the user which has initiated it .
def perform(self):
        self.retry += 1
        try:
            self.result = self.func(*tuple(self.args), **self.kwargs)
        except RetryableJobError as err:
            if err.ignore_retry:
                self.retry -= 1
                raise
            elif not self.max_retries:  
                raise
            elif self.retry >= self.max_retries:
                type_, value, traceback = sys.exc_info()
                new_exc = FailedJobError(
                    "Max. retries (%d) reached: %s" % (self.max_retries, value or type_)
                )
                raise new_exc from err
            raise
        return self.result
def perform ( self ) : self . retry += 1 try : self . result = self . func ( * tuple ( self . args ) , ** self . kwargs ) except RetryableJobError as err : if err . ignore_retry : self . retry -= 1 raise elif not self . max_retries : raise elif self . retry >= self . max_retries : type_ , value , traceback = sys . exc_info ( ) new_exc = FailedJobError ( "Max. retries (%d) reached: %s" % ( self . max_retries , value or type_ ) ) raise new_exc from err raise return self . result
Execute the job.
Execute the job .
"""Execute the job.

        The job is executed with the user which has initiated it.
        """ # infinite retries # change the exception type but keep the original # traceback and message: # http://blog.ianbicking.org/2007/09/12/re-raising-exceptions/
self