()
return inner
Return a uwsgi spooler compatible with celery interface
Return a uwsgi spooler compatible with celery interface
Return a uwsgi spooler compatible with celery interface
def u_worker():
    """
    Return a uwsgi spooler compatible with celery interface
    """
    # Ensure uwsgi is installed.

    from uwsgidecorators import spool

    def inner(f):
        """
        Alias to call .spool when calling .delay

        @spooler
        def job(foo):
           pass

        # Uwsgi type of launch
        job.spool(foo='')

        # Celery type of launch
        job.delay(foo='')

        """
        worker = spool(pass_arguments=True)(f)
        # Compatible with celery interface.
        worker.delay = worker.spool
        return worker

    return inner
def u_worker ( ) : # Ensure uwsgi is installed. from uwsgidecorators import spool def inner ( f ) : """
        Alias to call .spool when calling .delay

        @spooler
        def job(foo):
           pass

        # Uwsgi type of launch
        job.spool(foo='')

        # Celery type of launch
        job.delay(foo='')

        """ worker = spool ( pass_arguments = True ) ( f ) # Compatible with celery interface. worker . delay = worker . spool return worker return inner