(self)
return heartbeat
Create a heartbeat @periodic_task specifically for self.queue

        This is called on python startup so should avoid network calls
        and anything else slow.
Create a heartbeat @periodic_task specifically for self.queue
Create a heartbeat @periodic_task specifically for self . queue
def make_periodic_task(self):
        """
        Create a heartbeat @periodic_task specifically for self.queue

        This is called on python startup so should avoid network calls
        and anything else slow.
        """
        def heartbeat():
            try:
                self.get_and_report_blockage_duration()
                self.set_time_to_start(heartbeat.request.id)
            except HeartbeatNeverRecorded:
                pass
            self.mark_seen()

        heartbeat.__name__ = str(self.periodic_task_name)

        heartbeat = periodic_task(run_every=HEARTBEAT_FREQUENCY, queue=self.queue, ignore_result=True)(heartbeat)
        return heartbeat
def make_periodic_task ( self ) : def heartbeat ( ) : try : self . get_and_report_blockage_duration ( ) self . set_time_to_start ( heartbeat . request . id ) except HeartbeatNeverRecorded : pass self . mark_seen ( ) heartbeat . __name__ = str ( self . periodic_task_name ) heartbeat = periodic_task ( run_every = HEARTBEAT_FREQUENCY , queue = self . queue , ignore_result = True ) ( heartbeat ) return heartbeat