1.1.0 Example Code - lokokung/Starburst-Front-End-Control-System GitHub Wiki

Simple Setup

The following code initializes a ServerDaemon setup, links a couple of workers to it, and proceeds to start the daemon.

import feanta_server
import brick_worker
import pdu_worker

daemon = feanta_server.ServerDaemon('server.pid')
brick = brick_worker.BrickWorker()
pdu = pdu_worker.PDUWorker()

daemon.set_log_file('/log/logfile.txt')
daemon.link_worker(brick)
daemon.link_worker(pdu)
daemon.start()