addons14/queue_job/job.py
def job_record_with_same_identity_key(self):
        """Check if a job to be executed with the same key exists."""
        existing = (
            self.env["queue.job"]
            .sudo()
            .search(
                [
                    ("identity_key", "=", self.identity_key),
                    ("state", "in", [PENDING, ENQUEUED]),
                ],
                limit=1,
            )
        )
        return existing
Check if a job to be executed with the same key exists.
Check if a job to be executed with the same key exists.
Check if a job to be executed with the same key exists .
def job_record_with_same_identity_key(self):
        existing = (
            self.env["queue.job"]
            .sudo()
            .search(
                [
                    ("identity_key", "=", self.identity_key),
                    ("state", "in", [PENDING, ENQUEUED]),
                ],
                limit=1,
            )
        )
        return existing
def job_record_with_same_identity_key ( self ) : existing = ( self . env [ "queue.job" ] . sudo ( ) . search ( [ ( "identity_key" , "=" , self . identity_key ) , ( "state" , "in" , [ PENDING , ENQUEUED ] ) , ] , limit = 1 , ) ) return existing
Check if a job to be executed with the same key exists.
Check if a job to be executed with the same key exists .
"""Check if a job to be executed with the same key exists."""
self