Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """MCS Exchanger Module"""
- from maf_exchanger import HandlerModule
- class ModStats(HandlerModule):
- """Stats handler"""
- counter = 0
- def __init__(self):
- self.interval = 1
- def start(self, exchanger):
- exchanger.log("Collecting stats")
- exchanger.execute("/opt/exchanger/stats/disk-usage.php")
- def stop(self, exchanger):
- pass
- def tick(self, exchanger):
- """handler update method"""
- exchanger.log("Statscount:" + `self.counter`);
- self.counter = self.counter + 1;
- if self.counter > 10*1:
- self.counter = 0;
- exchanger.log("Collecting stats")
- exchanger.execute("/opt/exchanger/stats/disk-usage.php")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement