Skip to main content

QueueTeePie

QueueTeePie is a lightweight, pluggable Python library for background task processing. It includes features such as task scheduling, retry logic, task prioritization, and expiration handling.

Features

  • Task Scheduling: Schedule tasks to run at a later time.
  • Retry Logic: Retry tasks on failure.
  • Task Priority: Higher-priority tasks are executed first.
  • Task Expiration: Expired tasks are removed from the queue.
  • Background Workers: Process tasks asynchronously in the background.
  • SQLite Storage: Default persistent storage.

Installation

Clone the repository and install the dependencies with Poetry:

git clone https://github.com/yourusername/queue_tee_pie.git
cd queue_tee_pie
poetry install

Basic Usage

Enqueue a Task

from queue_tee_pie.core import TaskQueue

task_queue = TaskQueue()
task_queue.enqueue_task({'task_name': 'send_email', 'email': 'example@example.com'})

Start the Worker

from queue_tee_pie.core import TaskQueue
from queue_tee_pie.workers.worker import WorkerThread

task_queue = TaskQueue()
worker = WorkerThread(task_queue)
worker.start()

# Stop the worker gracefully
worker.stop()
worker.join()

Running the Worker Script

You can run the worker from the command line using the run_worker.py script:

python run_worker.py

License

This project is licensed under the Apache License.


This setup includes all of the essential components you need to get started with QueueTeePie as a lightweight background task processor. Let me know if you need further enhancements or specific adjustments!

Metadata

Release files for queue_tee_pie 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for queue_tee_pie 0.1.0
File Size Uploaded
queue_tee_pie-0.1.0.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for queue_tee_pie 0.1.0
File Interpreter ABI Platform
queue_tee_pie-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / queue_tee_pie-0.1.0.tar.gz

Download URL queue_tee_pie-0.1.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
209526418ec8b01e98ba0d4a5d73df1093091edb9ca5a7cae358d6abfb882bee
BLAKE2b-256 checksum
How to use checksums
d1d09dca902c4a4750d02ab2ec5e5f459c0c32cec71ef9aaa480dc8ebd6307c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.3 Darwin/23.1.0

Release files / queue_tee_pie-0.1.0-py3-none-any.whl

Download URL queue_tee_pie-0.1.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
386525ba6bfc7e7ad9db800e9cfd0a8b82ee9ce62e72d69a1250e48081366c55
BLAKE2b-256 checksum
How to use checksums
88f1ad3ac48443c461fc46c3a03ccb3519fab9a8ce4b60f47c22a9d61670c8a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.3 Darwin/23.1.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page