#events #task #dispatch

json-job-dispatch

Dispatch jobs described by JSON files and sort them according to their status

12 stable releases

3.1.0 Mar 7, 2025
3.0.2 May 30, 2023
3.0.1 Apr 10, 2022
3.0.0 Nov 22, 2021
1.1.1 Mar 30, 2017

#340 in Configuration

Download history 13/week @ 2024-12-11 2/week @ 2024-12-18 1/week @ 2025-01-08 3/week @ 2025-01-22 5/week @ 2025-01-29 23/week @ 2025-02-05 29/week @ 2025-02-12 8/week @ 2025-02-19 16/week @ 2025-02-26 151/week @ 2025-03-05 28/week @ 2025-03-12 13/week @ 2025-03-19 8/week @ 2025-03-26

205 downloads per month

MIT/Apache

99KB
2.5K SLoC

JSON Job Dispatch

A library which watches a directory using inotify for .json job files and dispatches them to registered handlers. Jobs are archived into accept/ and reject/ directories for auditing purposes. Additionally, companion files with a datestamp of when the job was handled and, for rejected jobs, a file containing the reason for the rejection is also created.

The design goal is to allow the daemon handling jobs to crash and be resiliant against crashes by using the filesystem as a simple object store for jobs which need handled and an archive of completed jobs. Atomic renames are used to relocate files, so the input directory must reside on the same filesystem as the archival directories.

Dependencies

~9–20MB
~291K SLoC