def enqueue_job(self, job, timeout=None, set_meta_data=True, async=True):
        """Enqueues a job for delayed execution.

        When the `timeout` argument is sent, it will overrides the default
        timeout value of 180 seconds.  `timeout` may either be a string or
        integer.

        If the `set_meta_data` argument is `True` (default), it will update
        the properties `origin` and `enqueued_at`.

        If Queue is instantiated with async=False, job is executed immediately.
        """
        if set_meta_data:
            job.origin = self.name

        if timeout:
            job.timeout = timeout
        else:
            job.timeout = PQ_DEFAULT_JOB_TIMEOUT  # default

        # set the simple sequential case on success
        job.uuid = uuid.uuid4()
        if self.jobs:
            try:
                prior_job = self.jobs.values()[-1]
            except __HOLE__:  # py33
                prior_job = self.jobs.popitem()[1]
            prior_job.if_result = job.uuid
            self.jobs[prior_job.uuid] = prior_job
        else:  # first job
            job.queue_id = self.name

        self.jobs[job.uuid] = job

        return job
dataset/ETHPy150Open bretth/django-pq/pq/flow.py/FlowQueue.enqueue_job