Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Str ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam defaults body ImportFrom alias Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot CompareIn Str AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Num Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str If CompareGt Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str BinOpMod Str SubscriptLoad SubscriptLoad NameLoad Index Str Slice AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad AttributeLoad NameLoad attr body Return Dict Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Raise Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A os N/A sys N/A smtplib N/A copy email.mime.text MIMEText email.utils formatdate make_msgid superlance.process_state_monitor ProcessStateMonitor N/A doc Base class for common functionality when monitoring process state changes
and sending email notification
 ProcessStateEmailMonitor N/A ProcessStateMonitor N/A N/A COMMASPACE ,  _get_opt_parser N/A N/A cls N/A N/A optparse OptionParser N/A parser N/A OptionParser N/A N/A N/A parser add_option -i --interval dest interval type float default 1.0 help batch interval in minutes (defaults to 1 minute) N/A N/A N/A parser add_option -t --toEmail dest to_emails help destination email address(es) - comma separated N/A N/A N/A parser add_option -f --fromEmail dest from_email help source email address N/A N/A N/A parser add_option -s --subject dest subject help email subject N/A N/A N/A parser add_option -H --smtpHost dest smtp_host default localhost help SMTP server hostname or address N/A N/A N/A parser add_option -e --tickEvent dest eventname default TICK_60 help TICK event name (defaults to TICK_60) N/A N/A N/A parser add_option -u --userName dest smtp_user default help SMTP server user name (defaults to nothing) N/A N/A N/A parser add_option -p --password dest smtp_password default help SMTP server password (defaults to nothing) N/A parser N/A classmethod parse_cmd_line_options N/A N/A cls N/A N/A N/A parser N/A N/A cls _get_opt_parser N/A N/A options args N/A N/A parser parse_args N/A options N/A classmethod validate_cmd_line_options N/A N/A cls options N/A N/A N/A parser N/A N/A cls _get_opt_parser N/A N/A N/A options to_emails N/A N/A N/A N/A parser print_help N/A N/A N/A sys exit 1 N/A N/A N/A options from_email N/A N/A N/A N/A parser print_help N/A N/A N/A sys exit 1 N/A validated N/A N/A copy copy options N/A N/A validated to_emails N/A N/A N/A x strip N/A x N/A N/A N/A options to_emails split , N/A validated N/A classmethod get_cmd_line_options N/A N/A cls N/A N/A N/A N/A N/A cls validate_cmd_line_options N/A N/A cls parse_cmd_line_options N/A classmethod create_from_cmd_line N/A N/A cls N/A N/A N/A options N/A N/A cls get_cmd_line_options N/A N/A N/A SUPERVISOR_SERVER_URL N/A os environ N/A N/A N/A N/A N/A sys stderr write Must run as a supervisor event listener
 N/A N/A N/A sys exit 1 N/A N/A cls N/A options __dict__ N/A classmethod __init__ N/A N/A self N/A kwargs N/A N/A N/A N/A ProcessStateMonitor __init__ self kwargs N/A N/A self from_email N/A kwargs N/A from_email N/A N/A self to_emails N/A kwargs N/A to_emails N/A N/A self subject N/A N/A kwargs get subject N/A N/A self smtp_host N/A N/A kwargs get smtp_host localhost N/A N/A self smtp_user N/A N/A kwargs get smtp_user N/A N/A self smtp_password N/A N/A kwargs get smtp_password N/A N/A self digest_len 76 N/A send_batch_notification N/A N/A self N/A N/A N/A email N/A N/A self get_batch_email N/A email N/A N/A N/A N/A self send_email email N/A N/A N/A self log_email email N/A log_email N/A N/A self email N/A N/A N/A email_for_log N/A N/A copy copy email N/A N/A email_for_log N/A to N/A N/A N/A self COMMASPACE join N/A email N/A to N/A N/A N/A len N/A email_for_log N/A body N/A self digest_len N/A N/A N/A email_for_log N/A body N/A %s... N/A N/A email_for_log N/A body N/A N/A self digest_len N/A N/A N/A self write_stderr N/A Sending notification email:
To: %(to)s
From: %(from)s
Subject: %(subject)s
Body:
%(body)s
 email_for_log N/A get_batch_email N/A N/A self N/A N/A N/A N/A len N/A self batchmsgs N/A N/A N/A to from subject body N/A self to_emails N/A self from_email N/A self subject N/A N/A join N/A N/A self get_batch_msgs N/A None N/A send_email N/A N/A self email N/A N/A N/A msg N/A MIMEText N/A email N/A body N/A N/A self subject N/A N/A N/A msg N/A Subject N/A email N/A subject N/A N/A msg N/A From N/A email N/A from N/A N/A msg N/A To N/A N/A N/A self COMMASPACE join N/A email N/A to N/A N/A msg N/A Date N/A formatdate N/A N/A msg N/A Message-ID N/A make_msgid N/A N/A N/A N/A N/A self send_smtp msg N/A email N/A to N/A N/A N/A Exception N/A e N/A N/A N/A N/A self write_stderr N/A Error sending email: %s
 e N/A send_smtp N/A N/A self mime_msg to_emails N/A N/A N/A s N/A N/A smtplib SMTP N/A self smtp_host N/A N/A N/A N/A N/A self smtp_user N/A self smtp_password N/A N/A N/A N/A s login N/A self smtp_user N/A self smtp_password N/A N/A N/A s sendmail N/A mime_msg N/A From to_emails N/A N/A mime_msg as_string N/A N/A N/A N/A N/A N/A s quit N/A N/A N/A N/A s quit N/A N/A