Skip to content
/ errands Public

Errands is an advanced task scheduling and execution framework designed to offer robust workload management capabilities for your project.

License

Notifications You must be signed in to change notification settings

iamksm/errands

Repository files navigation

Errands

Errands is an advanced task scheduling and execution framework designed to offer robust workload management capabilities for your project.

Table of Contents

  1. Introduction
  2. Requirements
  3. Setup
  4. Usage

Introduction

Errands stands out as a versatile project designed to offer a flexible and efficient framework for scheduling and executing tasks within the context of your project. The primary goal is to provide enhanced capabilities for managing a diverse range of workloads.

Requirements

Running Errands requires the following dependencies:

  • Python 3.x
  • croniter>=2.0.1

Setup

To integrate Errands into your project, follow these steps:

Installation

pip install errands

Configuration

Initiate the configuration by importing ErrandsConfig and initializing it with the BASE_DIR of your project. Use the errand decorator to mark the functions you wish to schedule.

from errands.config import ErrandsConfig

BASE_DIR = "/path/to/your/project"
errands_config = ErrandsConfig(BASE_DIR)

Usage

Effectively utilize Errands with the following guidelines:

Adding Errands

Schedule functions as errands by decorating them with the errand decorator:

from errands.executor import errand

@errand(cron_string="* * * * *", errand_type="SHORT")
def example_errand():
    # Errand logic here

Running the Errands

The errands run indefinitely. You can set them up as daemon processes using tools like supervisord. Run the errands based on their queue, setting up different commands to process distinct queues after configuration.

from errands.executor import LongErrandsExecutor, MediumErrandsExecutor, ShortErrandsExecutor

# Initialize the classes above separately to run the different queues

LongErrandsExecutor()

# or MediumErrandsExecutor() or ShortErrandsExecutor()

About

Errands is an advanced task scheduling and execution framework designed to offer robust workload management capabilities for your project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages