()
| 341 | gdata["zk_client"].stop() |
| 342 | |
| 343 | def main(): |
| 344 | check_conf() |
| 345 | expand_conf() |
| 346 | opts = getOpts() |
| 347 | if opts.version == True: |
| 348 | from seldon import __version__ |
| 349 | print __version__ |
| 350 | sys.exit(0) |
| 351 | |
| 352 | if not opts.quiet: |
| 353 | print get_seldon_banner(); print "" |
| 354 | |
| 355 | if opts.zk_hosts != None: |
| 356 | gdata["conf_data"]["zk_hosts"] = opts.zk_hosts |
| 357 | else: |
| 358 | opts.zk_hosts = gdata["conf_data"]["zk_hosts"] |
| 359 | |
| 360 | if opts.debug: |
| 361 | pp(opts) |
| 362 | pp(gdata) |
| 363 | |
| 364 | start_zk_client(opts) |
| 365 | Cmd.prompt = "seldon> " if not opts.quiet else "" |
| 366 | sys.argv = [sys.argv[0]] # the --zk-hosts argument upsets app |
| 367 | app = CmdLineApp() |
| 368 | app.cmdloop() |
| 369 | stop_zk_client() |
| 370 | |
| 371 | if __name__ == '__main__': |
| 372 | main() |
no test coverage detected