Skip to content

Instantly share code, notes, and snippets.

@fahadysf
fahadysf / README.md
Last active January 26, 2023 20:50
A multiprocess task broker which accepts and provides status reports for tasks using JSON REST API calls.

Multiprocess Task Broker with REST API

This gist shows and example or an asynchronous multiprocess task broker which can take job requests and report on running jobs via a minimal REST API.

Adapted from https://gist.github.com/nitaku/10d0662536f37a087e1b

All of the caveats from the original author still apply.

@fahadysf
fahadysf / taskdaemon-py3.py
Last active February 26, 2017 20:13
A multiprocess task broker which acts as: an example of Multiprocess asynchronous tasks which update a shared dictionary provided by multiprocess.Manager.
#!/usr/bin/python
from multiprocessing import Pool, Manager
from http.server import BaseHTTPRequestHandler, HTTPServer
import json
import cgi
import random, time
# Resources to read
#