src/sisy/models.py
def run(self, message):
        """Internal instance method run by worker process to actually run the task callable."""
        the_callable = self.func_from_info()
        try:
            task_message = dict(
                task=self,
                channel_message=message,
            )
            the_callable(task_message)
        finally:
            if self.end_running < self.next_run:
                self.enabled=False
                Channel(KILL_TASK_CHANNEL).send({'id': self.pk})
                return
            if self.iterations == 0:
                return
            else:
                self.iterations -= 1
                if self.iterations == 0:
                    self.enabled = False
                    Channel(KILL_TASK_CHANNEL).send({'id':self.pk})
                self.save()
def run(self, message):
        """Internal instance method run by worker process to actually run the task callable."""
        the_callable = self.func_from_info()
        try:
            task_message = dict(
                task=self,
                channel_message=message,
            )
            the_callable(task_message)
        finally:
            if self.end_running < self.next_run:
                self.enabled=False
                Channel(KILL_TASK_CHANNEL).send({'id': self.pk})
                return
            if self.iterations == 0:
                return
            else:
                self.iterations -= 1
                if self.iterations == 0:
                    self.enabled = False
                    Channel(KILL_TASK_CHANNEL).send({'id':self.pk})
                self.save()
Internal instance method run by worker process to actually run the task callable.