diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-09-07 17:33:45 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-09-07 17:33:45 +0000 |
commit | d3b45c4e44a5f95e22d75cfbcd232d0630125a51 (patch) | |
tree | 61332d7bc5fc6894cdc57d3c089a680418435aa4 /src/lib/Server | |
parent | 8ca9401c5db03f66bcd715186fcb27a3022a6539 (diff) | |
download | bcfg2-d3b45c4e44a5f95e22d75cfbcd232d0630125a51.tar.gz bcfg2-d3b45c4e44a5f95e22d75cfbcd232d0630125a51.tar.bz2 bcfg2-d3b45c4e44a5f95e22d75cfbcd232d0630125a51.zip |
add support for Cron and Stats writeback to Core.Service
2005/09/03 15:13:17-05:00 anl.gov!desai
change name to Service
2005/09/03 15:12:05-05:00 anl.gov!desai
add HandleChanges method
(Logical change 1.299)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1196 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r-- | src/lib/Server/Core.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index d02847794..5679f5d66 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -223,3 +223,20 @@ class Core(object): syslog(LOG_ERR, ' File "%s", line %i, in %s\n %s\n' % line) syslog(LOG_ERR, "%s: %s\n"%(trace, val)) del trace, val, trb + + def Service(self): + '''Perform periodic update tasks''' + while self.fam.fm.pending: + try: + self.fam.HandleEvent() + except: + self.LogFailure("FamEvent") + try: + self.core.RunCronTasks() + except: + self.LogFailure("Cron") + try: + self.core.stats.WriteBack() + except: + self.LogFailure("Statistics") + |