Exemple #1
0
class Server(Thread):
    def __init__(self, verbosity):
        super(Server, self).__init__()
        self.verbosity = verbosity

    def run(self):
        if self.verbosity > 0:
            logging.info("Starting server")
        self.server = GearmanServer(settings.GEARMAN_SERVERS[0])
        self.server.start()
Exemple #2
0
class Server(Thread):

    def __init__(self, verbosity):
        super(Server, self).__init__()
        self.verbosity = verbosity

    def run(self):
        if self.verbosity > 0:
            logging.info("Starting server")
        self.server = GearmanServer(settings.GEARMAN_SERVERS[0])
        self.server.start()
Exemple #3
0
 def start_server(self):
     self.server_pid = os.fork()
     if not self.server_pid:
         server = GearmanServer()
         server.start()
         sys.exit()
     connection = GearmanConnection(job_servers[0])
     for i in range(10):
         try:
             connection.connect()
         except GearmanConnection.ConnectionError:
             time.sleep(0.5)
         else:
             break
     connection.close()
Exemple #4
0
 def run(self):
     if self.verbosity > 0:
         logging.info("Starting server")
     self.server = GearmanServer(settings.GEARMAN_SERVERS[0])
     self.server.start()
Exemple #5
0
 def run(self):
     if self.verbosity > 0:
         logging.info("Starting server")
     self.server = GearmanServer(settings.GEARMAN_SERVERS[0])
     self.server.start()