def __init__(self,
              args,
              pidfile,
              stdin='/dev/null',
              stdout='/dev/null',
              stderr='/dev/null'):
     self.args = args
     Daemon.__init__(self, pidfile, stdin, stdout, stderr)
     self.mongo_connection = pymongo.MongoClient(self.args.host,
                                                 self.args.port)
     self.db_collection_1 = self.mongo_connection[self.args.db1][
         self.args.coll1]
     self.db_collection_2 = self.mongo_connection[self.args.db2][
         self.args.coll2]
Example #2
0
 def __init__(self, args, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
     Daemon.__init__(self, pidfile, stdin, stdout, stderr)
     self.args = args
 def __init__(self, args, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
     self.args = args
     Daemon.__init__(self, pidfile, stdin, stdout, stderr)
     self.mongo_connection = pymongo.MongoClient(self.args.host,self.args.port)
     self.db_collection_1 = self.mongo_connection[self.args.db1][self.args.coll1]
     self.db_collection_2 = self.mongo_connection[self.args.db2][self.args.coll2]