Runs an instance of a scheduled task

def run(self, **kwargs):
        """
        Runs an instance of a scheduled task
        """
        log = self.get_logger(**kwargs)
        failures = ScheduleFailure.objects
        log.info("Attempting to requeue <%s> failed schedules" % failures.count())
        for failure in failures.iterator():
            schedule = Schedule.objects.values(
                "id", "auth_token", "endpoint", "payload"
            )
            schedule = schedule.get(id=failure.schedule_id)
            schedule["schedule_id"] = str(schedule.pop("id"))
            # Cleanup the failure before requeueing it.
            failure.delete()
            DeliverTask.apply_async(kwargs=schedule)