import time
import logging
import Queue
+# Global config options
+import config
# daemonize and *pid
from util.process import *
# Email
import mailer
import emailTxt
-# Defaults
-debug = False
# Log to what
LOG="./monitor.log"
for thread in runningthreads.keys():
# If thread found dead, remove from queue
if not runningthreads[thread].isAlive():
- logger.error("Thread Died: %s" %(thread))
+ logger.error("***********Thread died: %s**********" %(thread))
del runningthreads[thread]
"""
def main():
# Defaults
- global debug, status, logger
+ global status, logger
try:
longopts = ["debug", "status", "help"]
for (opt, optval) in opts:
if opt == "-d" or opt == "--debug":
- debug = True
+ config.debug = True
+ print "Running in DEBUG mode: NO EMAILS SENT AND NO SLICES SQUEEZED."
elif opt == "--status":
#print summary(names)
sys.exit(0)
- pol.status()
-
# Store state of emails
pol.emailedStore("WRITE")