def stop(self, env): import params env.set_params(params) service_pid = util.get_service_pid(SERVICE_NAME) if service_pid: stop_command = "sudo kill -9 {0}".format(service_pid) util.command_exe(stop_command, SERVICE_NAME) else: Logger.warning("{0} did not started!".format(SERVICE_NAME))
def start(self, env): import params env.set_params(params) start_package_server_cmd = format("sudo bash -x {start_service_script} {start_package_server_script}") is_success = util.command_exe(start_package_server_cmd, SERVICE_NAME) if not is_success: Logger.error("Cannot allocate memory")
def start(self, env): import params env.set_params(params) shards = len(params.worker_hosts) shardid = str(sorted(params.worker_hosts).index(params.hostname)) cmd_args = " {0} {1} {2}".format(shards, shardid, 3) start_worker_cmd = format("sudo bash -x {start_service_script} {start_worker_script} {hermes_topic}") + cmd_args is_success = util.command_exe(start_worker_cmd, SERVICE_NAME) if not is_success: Logger.error("Cannot allocate memory")
def start(self, env): import params env.set_params(params) start_dispatcher_cmd = format("sudo bash -x {start_service_script} {start_dispatcher_script} {debug_jms_port}") util.command_exe(start_dispatcher_cmd, SERVICE_NAME)