Skip to main content

A tool to monitor and execute Celery tasks

Project description

logo

Veggie - Celery monitoring and execution

Veggie is a web-based tool for monitoring the status of Celery tasks and starting tasks through a UI. It stores Celery events in a SQLite database but allows easy switch to another user-defined storage backend.

Installation

pip install veggie

Quickstart

To enable better task monitoring, add the following to your Celery application:

celery_app = Celery("myapp")

celery_app.conf.worker_send_task_events = True  # Enables task events
celery_app.conf.task_send_sent_event = True  # Enables sent events
celery_app.conf.task_track_started = True  # Update task result state to STARTED
celery_app.conf.result_extended = True  # Store args and kwargs in the result

Start monitoring by adding the following to your Celery application or in a separate script:

from veggie.monitor import CeleryMonitor
from veggie.storage import SQLiteStorage

os.environ["VEGGIE_PORT"] = "5000"  # Set port for the UI and API

if __name__ == "__main__":
    celery_monitor = CeleryMonitor(celery_app=celery_app, storage=SQLiteStorage(path="events.db")) # or any other storage class that inherits from veggie.storage.Storage
    celery_monitor.start()

Open your browser at http://localhost:5000:

Check the status of past and running tasks:

Select a task to view its details:

Start a new task by entering values for its parameters through the UI:

See the example folder for a full example.

REST API

Access the API at http://localhost:5000/api/

Configure your own storage backend

All storage implementations should inherit from the veggie.storage.Storage class and implement the store_event(), get_events() and get_event_by_id() methods. For an example, check the SQLiteStorage implementation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veggie-0.1.12.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veggie-0.1.12-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file veggie-0.1.12.tar.gz.

File metadata

  • Download URL: veggie-0.1.12.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for veggie-0.1.12.tar.gz
Algorithm Hash digest
SHA256 93be76585f345c2a4033eb32dae0278e5fd0855ce9e50037f1f179afb1c9d843
MD5 d25e5c49afc8c909f8e7dced7b3c807e
BLAKE2b-256 9e7e74236f56b1d7492b0840020991218233308f476548e3a8ecdd497ee8db21

See more details on using hashes here.

File details

Details for the file veggie-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: veggie-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for veggie-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 fed859ed92af73955ef26387362e5138c457edcf7b3e865c0f004f10467b8947
MD5 ace926f21728ec153c6204a417de87e2
BLAKE2b-256 4e957f0d27948e04f802b7159c4834814a1d2e6c67d15ffab3f0c807ee6164f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page