watchdog#

tradeexecutor.cli.watchdog Python module in Trading Strategy framework.

Module description#

Watch out for internal oracle hang conditions.

Suitable for multithread and multiprocess watching.

Classes#

WatchdogMode

How does the watchdog communicate with its tasks.

Functions#

check_hung_workers(watchdog_registry)

Check that all workers have reported in time.

create_watchdog_registry(mode)

Create new multiprocess co-ordation structure.

get_last_ping(watchdog_registry, name)

Get the UNIX timestamp when a process pinged last time.

get_timeout(watchdog_registry, name)

Get the UNIX timestamp when a process pinged last time.

get_watched_workers(watchdog_registry)

Get list of processes that are on the watchdog list.

mark_alive(watchdog_registry, name[, time_])

Mark the worker being alive.

register_worker(watchdog_registry, name, ...)

Register a worker/main loop.

start_background_watchdog(watchdog_registry)

Call in the main thread.

stop_watchdog()

Stop making watchdog checks.

suicide()

Hard kill Python application despite multiple threads.