def __init__(self, threads): install(threads) pl = PluginLoader() plugins = pl.load(eager()) agent = Agent(plugins) agent.start(False) while True: sleep(10) print 'Agent: sleeping...'
def start(self): self.mkdir() logutil.LOGDIR = self.ROOT from gofer.agent.main import PluginLoader, Agent, AgentLock, eager from gofer.rmi.store import PendingQueue AgentLock.PATH = os.path.join(self.ROOT, 'gofer.pid') PendingQueue.ROOT = os.path.join(self.ROOT, 'messaging/pending') self.mkdir(PendingQueue.ROOT) pl = PluginLoader() plugins = pl.load(eager()) agent = Agent(plugins) agent.start(False) print 'Agent: started. Logging in: %s' % logutil.LOGDIR while True: time.sleep(10) print 'Agent: sleeping...'