Module Expr Str Import alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ImportFrom alias alias alias alias alias ImportFrom alias alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str keyword Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign AttributeStore Call AttributeLoad NameLoad attr NameLoad Str attr BinOpMod Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign AttributeStore Call AttributeLoad NameLoad attr NameLoad Str attr BinOpMod Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign AttributeStore Call AttributeLoad NameLoad attr NameLoad Str attr BinOpMod Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str keyword Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str For NameStore SubscriptLoad NameLoad Index Str body If CompareEq NameLoad Str body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Call NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str For NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad body If CompareEq NameLoad Str body Continue Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword Call NameLoad SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index NameLoad Index Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad Num kwarg body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad ListLoad Num Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Str Str Str Str Num Dict Str Num Dict Str Num Dict Str Num Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert AttributeLoad NameLoad attr Assert CompareNotIn NameLoad AttributeLoad NameLoad attr Assert Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr GeneratorExp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore NameLoad CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad ListLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad For NameStore NameLoad body If UnaryOpNot SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Dict Str Str Str Str Num Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr BinOpDiv Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body AugAssignAdd SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Index Str NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Dict Str NameLoad If AttributeLoad NameLoad attr body If CompareIn AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr body AugAssignAdd SubscriptStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Index Str NameLoad orelse Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Dict Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr body If CompareEq NameLoad Str body Continue Expr Call AttributeLoad NameLoad attr Str NameLoad SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameStore Call AttributeLoad NameLoad attr Delete AttributeDel NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr NameLoad orelse Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr ListLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore BinOpDiv Num Call NameLoad NameLoad Assert NameLoad Assign NameStore BinOpMult Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AugAssignAdd NameStore NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub BinOpSub NameLoad NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad orelse If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list decorator_list
N/A N/A Core scheduler

The basic object for a class is a Runnable. All classes used for tasks
must be subclasses of Runnable. Runnable's store the tasks' repeat
interval and any subtasks it depends on.

The Scheduler class handles running the Runnables.

Scheduling works as follows:
    1. During startup all top level tasks are added to the scheduler
       via schobj.register()
    2. After all initialization is finished schobj.start() is called.
    3. Before start() starts scheduling stuff it runs _create_groups()
       to group all top level tasks which have any subtasks in common.
       This ensures that tests that need to run the same queries are
       run at the same time.
    4. All top level objects are started in a random interval between
       now and their repeat interval to distribute things.
    5. Each time a top level task finishes it will reschedule itself.
 N/A time N/A random collections defaultdict deque itertools chain twisted.internet defer reactor task N/A N/A lxml etree N/A N/A N/A ImportError N/A N/A etree None nagcat log monitor_api query test trend nagcat.runnable Runnable RunnableGroup SchedulerPage N/A N/A monitor_api XMLPage N/A N/A Information on objects in the Nagcat scheduler __init__ N/A N/A self scheduler N/A N/A N/A N/A N/A N/A super SchedulerPage self __init__ N/A N/A self scheduler scheduler N/A xml N/A N/A self request N/A N/A N/A sch N/A N/A etree Element Scheduler version 1.0 N/A data N/A N/A N/A self scheduler stats N/A lat N/A N/A etree SubElement sch Latency period N/A str N/A N/A data N/A latency N/A period N/A N/A N/A N/A etree SubElement lat Maximum text N/A %f N/A N/A data N/A latency N/A max N/A N/A N/A N/A etree SubElement lat Minimum text N/A %f N/A N/A data N/A latency N/A min N/A N/A N/A N/A etree SubElement lat Average text N/A %f N/A N/A data N/A latency N/A avg N/A tasks N/A N/A etree SubElement sch Tasks count N/A str N/A N/A data N/A tasks N/A count N/A task_type N/A data N/A tasks N/A N/A N/A task_type count N/A N/A N/A task_node N/A N/A etree SubElement tasks task_type count N/A str N/A N/A N/A data N/A tasks N/A task_type N/A count N/A sub_type N/A N/A data N/A tasks N/A task_type N/A N/A N/A sub_type count N/A N/A N/A N/A N/A etree SubElement task_node task_type type sub_type count N/A str N/A N/A N/A N/A data N/A tasks N/A task_type N/A sub_type N/A count N/A sch N/A N/A Scheduler N/A object N/A N/A Run things! N/A trend None N/A monitor None __init__ N/A N/A self config rradir rrdcache monitor_port default_timeout N/A None None None None 15 kwargs N/A N/A N/A self _registered N/A set N/A N/A self _group_index N/A defaultdict set N/A N/A self _startup True N/A N/A self _shutdown None N/A N/A self _latency N/A deque N/A 0 60 N/A N/A self _latency_call None N/A N/A self _task_stats N/A count Group Test Query 0 N/A count 0 N/A count 0 N/A count 0 N/A N/A self default_timeout default_timeout N/A monitor_port N/A N/A N/A self _monitor_port monitor_port N/A N/A self monitor N/A N/A monitor_api MonitorSite N/A page N/A SchedulerPage self N/A N/A N/A N/A self monitor includeChild scheduler page N/A rradir N/A N/A N/A self trend N/A N/A trend TrendMaster rradir rrdcache N/A N/A self query N/A N/A query QueryManager self N/A N/A N/A self build_tests config kwargs N/A build_tests N/A N/A self config N/A kwargs N/A N/A N/A Exception unimplemented N/A new_test N/A N/A self config N/A N/A N/A new N/A N/A test Test self config N/A N/A N/A self register new N/A N/A self trend N/A N/A N/A N/A N/A self trend setup_test_trending new config N/A new N/A new_query N/A N/A self config qcls N/A None N/A N/A N/A N/A N/A self query new_query config qcls N/A register N/A N/A self task N/A N/A N/A Register a top level Runnable to be run directly by the scheduler N/A N/A self _startup N/A N/A task N/A self _group_index N/A N/A isinstance task Runnable N/A N/A N/A log trace Registering task %s task N/A task_deps N/A N/A task getAllDependencies N/A all_groups N/A N/A chain from_iterable N/A N/A N/A self _group_index N/A d N/A d task_deps N/A groups N/A set N/A g N/A g all_groups N/A N/A g repeat N/A task repeat N/A update_index N/A set task_deps N/A N/A N/A update_index add task N/A N/A groups N/A N/A group N/A RunnableGroup N/A task N/A task repeat N/A N/A N/A self _update_stats group N/A N/A N/A N/A self _registered add group N/A N/A N/A log trace Created group %s group N/A N/A group N/A N/A groups pop N/A N/A N/A group addDependency task N/A N/A N/A log trace Updated group %s group N/A extra_group groups N/A N/A N/A N/A self _update_stats extra_group -1 N/A N/A N/A N/A self _registered remove extra_group N/A N/A N/A group addDependencies extra_group N/A N/A N/A update_index update N/A N/A extra_group getAllDependencies N/A N/A N/A log trace Merged group %s extra_group N/A runnable update_index N/A N/A N/A N/A N/A self _group_index N/A runnable N/A N/A N/A N/A self _update_stats runnable N/A N/A N/A N/A N/A self _group_index N/A runnable add group N/A N/A N/A N/A N/A self _group_index N/A runnable difference_update groups N/A stats N/A N/A self N/A N/A N/A Get a variety of stats to report on N/A data N/A tasks N/A self _task_stats N/A N/A data N/A latency N/A period max min avg 60 N/A max N/A self _latency N/A min N/A self _latency N/A N/A sum N/A self _latency N/A len N/A self _latency N/A data N/A _update_stats N/A N/A self runnable inc N/A 1 N/A N/A Record a previously unknown runnable N/A N/A N/A self _task_stats N/A count inc N/A N/A N/A runnable type N/A self _task_stats N/A N/A N/A N/A N/A self _task_stats N/A N/A runnable type N/A count inc N/A N/A N/A N/A self _task_stats N/A N/A runnable type N/A count inc N/A N/A runnable name N/A N/A N/A N/A runnable name N/A N/A self _task_stats N/A N/A runnable type N/A N/A N/A N/A N/A N/A self _task_stats N/A N/A runnable type N/A N/A runnable name N/A count inc N/A N/A N/A N/A N/A self _task_stats N/A N/A runnable type N/A N/A runnable name N/A count inc N/A _log_stats N/A N/A self N/A N/A N/A Report the number of tasks N/A N/A N/A log info Tasks: %s N/A N/A self _task_stats N/A count N/A N/A N/A log info Groups: %s N/A N/A N/A self _task_stats N/A Group N/A count N/A N/A N/A log info Tests: %s N/A N/A N/A self _task_stats N/A Test N/A count N/A N/A N/A log info Queries: %s N/A N/A N/A self _task_stats N/A Query N/A count N/A N/A query_type query_info N/A N/A N/A N/A self _task_stats N/A Query iteritems N/A N/A N/A query_type count N/A N/A N/A N/A N/A log info Query %s: %s query_type N/A query_info N/A count N/A start N/A N/A self N/A N/A N/A Start up the scheduler! N/A N/A N/A self _startup N/A N/A self _shutdown N/A N/A self _startup False N/A N/A self _shutdown deferred N/A N/A defer Deferred N/A N/A self _group_index N/A N/A N/A self _registered N/A N/A N/A N/A self stop N/A deferred N/A N/A self monitor N/A N/A N/A N/A reactor listenTCP N/A self _monitor_port N/A self monitor N/A N/A N/A self _log_stats N/A host_groups N/A N/A runnable N/A self _registered N/A N/A N/A N/A runnable finalize N/A N/A N/A runnable host host_groups N/A N/A N/A N/A N/A host_groups N/A N/A runnable host append runnable N/A N/A N/A host_groups N/A N/A runnable host N/A runnable N/A N/A host_name host_group N/A N/A host_groups iteritems N/A N/A N/A N/A log debug Scheduling host %s host_name N/A slot N/A 60.0 N/A len host_group N/A slot N/A delay N/A N/A N/A random random slot N/A runnable host_group N/A N/A N/A N/A self schedule runnable delay N/A delay slot N/A N/A self _latency_call N/A N/A reactor callLater 1.0 N/A self latency N/A N/A time time N/A N/A N/A log info Startup complete, running... N/A deferred N/A schedule N/A N/A self runnable delay N/A None N/A N/A (re)schedule a top level runnable N/A N/A delay None N/A N/A delay N/A runnable repeat N/A N/A delay N/A N/A N/A N/A log error Task %s has no repeat value. runnable N/A N/A N/A N/A log debug Scheduling %s in %s seconds. runnable delay N/A deferred N/A N/A task deferLater reactor delay N/A runnable start N/A N/A N/A deferred addBoth N/A N/A N/A x N/A N/A N/A self schedule runnable N/A stop N/A N/A self N/A N/A N/A Stop the scheduler N/A N/A self _shutdown N/A N/A self _latency_call N/A N/A N/A N/A N/A self _latency_call cancel N/A N/A self _latency_call None N/A deferred N/A self _shutdown N/A N/A self _shutdown None N/A N/A N/A deferred callback None N/A latency N/A N/A self last N/A N/A N/A now N/A N/A time time N/A N/A self _latency_call N/A N/A reactor callLater 1.0 N/A self latency now N/A latency N/A N/A now last 1.0 N/A N/A N/A N/A self _latency append latency N/A N/A latency 5.0 N/A N/A N/A N/A log error N/A Callback latency: %s latency N/A N/A N/A latency 1.5 N/A N/A N/A N/A log warn N/A Callback latency: %s latency N/A N/A