Skip to content

Instantly share code, notes, and snippets.

View rickhurst's full-sized avatar

Rick Hurst rickhurst

View GitHub Profile
@WPprodigy
WPprodigy / action-scheduler.php
Last active November 17, 2021 09:48
Dynamic Queue adjustments for autoscaling Action Scheduler.
<?php
/*
* Dynamic Queue adjustments for autoscaling Action Scheduler.
*
* Every few minutes, this checks to see if the AS queue has exceeded a certain
* threshold of "due now" actions. And if so, will schedule additional queues to run
* concurrently in cron until the queue is caught up.
*
* Scales directly off of cron control's JOB_CONCURRENCY_LIMIT.
@asimihsan
asimihsan / tornadolog.py
Last active October 28, 2019 22:13
Tail a file over HTTP WebSockets with a Tornado server.
#!/usr/bin/env python
import logging
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.websocket
from tornado.options import define, options
from tornado.process import Subprocess