Skip to content

Commit bbbd819

Browse files
committedAug 21, 2013
Fix the VMPoller worker after some of the refactoring
1 parent 683b37d commit bbbd819

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎src/vm-pollerd-worker

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ The requests are ZeroMQ messages.
3333
TODO: Better document this module
3434
"""
3535

36-
from vmpollerd.core import VMPollerDaemon
36+
from vmpollerd.core import VMPollerWorker
3737

3838
def main():
39-
pollerd = VMPollerDaemon("/etc/vm-poller")
40-
pollerd.run()
39+
worker = VMPollerWorker("/var/run/vm-pollerd-worker.pid")
40+
worker.run("/etc/vm-poller/vm-pollerd-worker.conf")
4141

4242
if __name__ == '__main__':
4343
main()

‎src/vmpollerd/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def run(self, config_file):
7575
7676
"""
7777
if not os.path.exists(config_file):
78-
raise VMPoller, "Configuration file %s does not exists: %s" % (config_file, e)
78+
raise VMPollerException, "Configuration file does not exists: %s" % config_file
7979

8080
config = ConfigParser.ConfigParser()
8181
config.read(config_file)
@@ -93,7 +93,7 @@ def run(self, config_file):
9393

9494
# Load the config for every Agent and vCenter
9595
for eachConf in confFiles:
96-
agent = VMPollerAgent(eachConf, ignore_locks=True, lockdir="/var/run/vm-pollerd", keep_alive=True)
96+
agent = VMPollerWorkerAgent(eachConf, ignore_locks=True, lockdir="/var/run/vm-pollerd", keep_alive=True)
9797
self.agents[agent.vcenter] = agent
9898

9999
# Time to fire up our poller Agents

0 commit comments

Comments
 (0)
Please sign in to comment.