summaryrefslogtreecommitdiffstats
path: root/tasker/reporting.py
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2007-12-19 13:28:18 +0100
committerMartin Sivak <msivak@redhat.com>2007-12-19 13:28:18 +0100
commita9d245e9ddf98c84825ee5accfffa43a23575c16 (patch)
tree61c67a63d0e0e4b98f376188b2622b35ffd51823 /tasker/reporting.py
parent9ab7cc7593030654a67f992ee7775243741baa58 (diff)
downloadfirstaidkit-a9d245e9ddf98c84825ee5accfffa43a23575c16.tar.gz
firstaidkit-a9d245e9ddf98c84825ee5accfffa43a23575c16.tar.xz
firstaidkit-a9d245e9ddf98c84825ee5accfffa43a23575c16.zip
- Make simple reporting thread in main
- Update reporting to support End-Of-Operations message - Update main and interpret to send the End-Of-Operations message - Subclass dict in plugins as Flow and add support for description - Update example plugins to use Flow instead of pure dictionary
Diffstat (limited to 'tasker/reporting.py')
-rw-r--r--tasker/reporting.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tasker/reporting.py b/tasker/reporting.py
index 38f84b4..1fa60f2 100644
--- a/tasker/reporting.py
+++ b/tasker/reporting.py
@@ -34,6 +34,7 @@ PROGRESS = 2
INFO = 3
ALERT = 4
EXCEPTION = 5
+END = 1000 #End of operations, final message
class Reports(object):
"""Instances of this class are used as reporting mechanism by which the
@@ -64,6 +65,9 @@ class Reports(object):
#There will be helper methods inspired by logging module
+ def end(self):
+ return self.put(None, None, END, importance = 1000)
+
def error(self, message, origin, semantics):
return self.put(message, origin, semantics, importance = logging.ERROR)