def find_task_by_id ( self , id , session = None ) : with self . _session ( session ) as session : return session . query ( TaskRecord ) . get ( id )
python celery get task by id
Find task with the given record ID .
def find_task_by_id(self, id, session=None):
        """
        Find task with the given record ID.
        """
        with self._session(session) as session:
            return session.query(TaskRecord).get(id)