()
return inner
Return a celery worker compatible with uwsgi interface
Return a celery worker compatible with uwsgi interface
Return a celery worker compatible with uwsgi interface
def c_worker():
    """
    Return a celery worker compatible with uwsgi interface
    """
    from biostar.celery import app

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

        @spooler
        def job(foo):
           pass

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

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

        """
        worker = app.task(f)
        # Compatible with uwsgi interface.
        worker.spool = worker.delay
        return worker

    return inner
def c_worker ( ) : from biostar . celery import app def inner ( f ) : """
        Alias to call .delay when calling .spool

        @spooler
        def job(foo):
           pass

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

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

        """ worker = app . task ( f ) # Compatible with uwsgi interface. worker . spool = worker . delay return worker return inner