from time import sleep

from celery import Celery

app = Celery("tasks", broker='redis://localhost:6379/1')


@app.task
def add(a, b):
    sleep(5)
    return a + b


if __name__ == '__main__':
    # print(add(4, 6))
    print(add.delay(4, 6))

97b5e0d40180cf92649b08157fca9e10c8bf9aba
<mask token>


@app.task
def add(a, b):
    sleep(5)
    return a + b


<mask token>

<mask token>


@app.task
def add(a, b):
    sleep(5)
    return a + b


if __name__ == '__main__':
    print(add.delay(4, 6))

<mask token>
app = Celery('tasks', broker='redis://localhost:6379/1')


@app.task
def add(a, b):
    sleep(5)
    return a + b


if __name__ == '__main__':
    print(add.delay(4, 6))

from time import sleep
from celery import Celery
app = Celery('tasks', broker='redis://localhost:6379/1')


@app.task
def add(a, b):
    sleep(5)
    return a + b


if __name__ == '__main__':
    print(add.delay(4, 6))

from time import sleep

from celery import Celery

app = Celery("tasks", broker='redis://localhost:6379/1')


@app.task
def add(a, b):
    sleep(5)
    return a + b


if __name__ == '__main__':
    # print(add(4, 6))
    print(add.delay(4, 6))
