def __init__(self, url, uuid, threads, auth, exchange): setup_logging() install(url, uuid, threads, auth, exchange) PluginLoader.load_all() agent = Agent() agent.start(False) while True: sleep(10) print 'Agent: sleeping...'
def __init__(self, url, queue, threads, auth, exchange): setup_logging() install(url, queue, threads, auth, exchange) PluginLoader.load_all() agent = Agent() agent.start(False) while True: sleep(10) print('Agent: sleeping...')
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, spoofing=None): self._setup_logging() self._setup_spoofing(spoofing) self._setup_locking() self._setup_pending_queue() from gofer.agent.main import PluginLoader, Agent PluginLoader.load_all() agent = Agent() agent.start(False) print 'Agent pid:%s started. Working directory [ %s ]' % (os.getpid(), self.root) while True: time.sleep(10)
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...'