app.decorators

Functions

asyncr(f)

Decorator to run a function asynchronously.

Module Contents

app.decorators.asyncr(f)[source]

Decorator to run a function asynchronously.

We use this decorator to send emails on a separate thread without blocking the main thread.

Parameters:

f (function) – The function to be decorated.

Returns:

A wrapper function that runs the original function in a separate thread.

Return type:

function