For the complete documentation index, see llms.txt. This page is also available as Markdown.

Celery Workers

Developers can set up and run the OpenG2P Registry Celery Workers on their local machines. The Workers execute the tasks enqueued by the Celery Beat Producers.

Prerequisites

  • Python3

  • Git

  • PostgreSQL

  • Redis

  • Celery

Installation of Celery Workers

1. Update system packages

Log in to your Linux server using SSH and update the package list and upgrade the existing packages:

sudo apt update
sudo apt upgrade -y

2. Install dependencies

sudo apt install -y python3-pip python3-dev python3-venv build-essential libpq-dev

3. Install and configure PostgreSQL

The Registry uses PostgreSQL as the database engine. Install PostgreSQL (if not already installed) and create a new database user and database.

4. Install and configure Redis

Redis is used as the Celery broker and result backend.

5. Clone the Registry Celery Repository

6. Install Python Libraries and Run Celery Workers

  • Create a new Python virtual environment:

  • Activate the virtual environment:

  • Install required Python packages:

  • Create a .env file:

  • Start Redis server (if not already running):

  • Run Celery Worker:

Verifying the Installation

The terminal logs should show the worker connecting to the broker and picking up tasks from the celery_jobs_worker_queue queue as the Beat Producers dispatch them.

Last updated

Was this helpful?