示例#1
0
文件: agent.py 项目: splice/gofer
 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...'
示例#2
0
文件: main.py 项目: splice/gofer
    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...'