Skip to content

Async Task

Racine Index / App / Abstract / Async Task

Auto-generated documentation for app.abstract.async_task module.

Task

Show source in async_task.py:103

This is a simple async task implementation that can be used as a drop-in replacement for Celery. It is not meant to be used on a server with high load, but it is useful for development, testing and for the standalone version of the app.

Signature

class Task:
    def __init__(self, func, name, time_limit): ...

Task().AsyncResult

Show source in async_task.py:119

Signature

def AsyncResult(self, worker_id: str): ...

Task().delay

Show source in async_task.py:115

Signature

def delay(self, *args, **kwargs): ...

TaskProxy

Show source in async_task.py:140

Signature

class TaskProxy: ...

TaskProxy.update_state

Show source in async_task.py:141

Signature

@staticmethod
def update_state(state, meta): ...

Worker

Show source in async_task.py:38

Signature

class Worker(threading.Thread):
    def __init__(self, func, name, time_limit, *args, **kwargs): ...

Worker().abort

Show source in async_task.py:71

Signature

def abort(self): ...

Worker().update_state

Show source in async_task.py:67

Signature

def update_state(self, state, meta): ...

async_init_app

Show source in async_task.py:153

Signature

def async_init_app(app: Flask) -> None: ...

celery_init_app

Show source in async_task.py:16

Signature

def celery_init_app(app: Flask) -> None: ...

monitor_tasks

Show source in async_task.py:123

Signature

def monitor_tasks(): ...

task_decorator

Show source in async_task.py:146

Signature

def task_decorator(name, soft_time_limit=None): ...