Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/testdrivenio/fastapi-celery

Example of how to handle background processes with FastAPI, Celery, and Docker
https://github.com/testdrivenio/fastapi-celery

fastapi fastapi-celery fastapi-docker task-queue

Last synced: about 2 months ago
JSON representation

Example of how to handle background processes with FastAPI, Celery, and Docker

Awesome Lists containing this project

README

        

# Asynchronous Tasks with FastAPI and Celery

Example of how to handle background processes with FastAPI, Celery, and Docker.

## Want to learn how to build this?

Check out the [post](https://testdriven.io/blog/fastapi-and-celery/).

## Want to use this project?

Spin up the containers:

```sh
$ docker-compose up -d --build
```

Open your browser to [http://localhost:8004](http://localhost:8004) to view the app or to [http://localhost:5556](http://localhost:5556) to view the Flower dashboard.

Trigger a new task:

```sh
$ curl http://localhost:8004/tasks -H "Content-Type: application/json" --data '{"type": 0}'
```

Check the status:

```sh
$ curl http://localhost:8004/tasks/
```