Mercurial > repos > melissacline > ucsc_xena_platform
comparison runXena.py @ 32:63b1ba1e3424
server status message more accurate -- http
author | jingchunzhu <jingchunzhu@gmail.com> |
---|---|
date | Tue, 21 Jul 2015 23:01:26 -0700 |
parents | bb84d3bc5308 |
children | 7ceb967147c3 |
comparison
equal
deleted
inserted
replaced
31:bb84d3bc5308 | 32:63b1ba1e3424 |
---|---|
82 # | 82 # |
83 # When checking status, if Xena is running, then report that it's running | 83 # When checking status, if Xena is running, then report that it's running |
84 # with hostname and port. If it's not running, then report as such. | 84 # with hostname and port. If it's not running, then report as such. |
85 # | 85 # |
86 if xenaIsRunning: | 86 if xenaIsRunning: |
87 fp.write("Xena VM currently running on %s:%s\n" % (hostname, xenaPort)) | 87 fp.write("Xena VM currently running on http://%s:%s\n" % (hostname, xenaPort)) |
88 fp.write("You can add %s:%s to Xena Data Hub\n" % (hostname, xenaPort)) | 88 fp.write("You can add http://%s:%s to Xena Data Hub\n" % (hostname, xenaPort)) |
89 else: | 89 else: |
90 fp.write("Xena VM is not currently running on %s\n" % (hostname)) | 90 fp.write("Xena VM is not currently running on %s\n" % (hostname)) |
91 | 91 |
92 elif sys.argv[1] == "start": | 92 elif sys.argv[1] == "start": |
93 # | 93 # |
96 # report as such. In either case, close the output file before this | 96 # report as such. In either case, close the output file before this |
97 # process goes into daemon mode. | 97 # process goes into daemon mode. |
98 # | 98 # |
99 if not xenaIsRunning: | 99 if not xenaIsRunning: |
100 xenaPort = xena.port(testIfAvailable=True, findNewPort=True) | 100 xenaPort = xena.port(testIfAvailable=True, findNewPort=True) |
101 fp.write("Starting Xena VM on %s:%s\n" % (hostname, xenaPort)) | 101 fp.write("Starting Xena VM on http://%s:%s\n" % (hostname, xenaPort)) |
102 fp.write("You can add http://%s:%s to Xena Data Hub\n" % (hostname, xenaPort)) | 102 fp.write("You can add http://%s:%s to Xena Data Hub\n" % (hostname, xenaPort)) |
103 else: | 103 else: |
104 fp.write("Xena VM already running on %s:%s\n" % (hostname, xenaPort)) | 104 fp.write("Xena VM already running on http://%s:%s\n" % (hostname, xenaPort)) |
105 fp.write("You can add http://%s:%s to Xena Data Hub\n" % (hostname, xenaPort)) | 105 fp.write("You can add http://%s:%s to Xena Data Hub\n" % (hostname, xenaPort)) |
106 fp.close() | 106 fp.close() |
107 | 107 |
108 elif sys.argv[1] == "stop": | 108 elif sys.argv[1] == "stop": |
109 # | 109 # |
110 # When stopping Xena, if it's currently running, report that Xena | 110 # When stopping Xena, if it's currently running, report that Xena |
111 # is being terminated and clean up the port. If it's not running, | 111 # is being terminated and clean up the port. If it's not running, |
112 # report as such. | 112 # report as such. |
113 # | 113 # |
114 if xenaIsRunning: | 114 if xenaIsRunning: |
115 fp.write("Terminating Xena VM on %s:%s\n" % (hostname, xenaPort)) | 115 fp.write("Terminating Xena VM on http://%s:%s\n" % (hostname, xenaPort)) |
116 else: | 116 else: |
117 fp.write("Xena VM is not currently running on %s\n" % (hostname)) | 117 fp.write("Xena VM is not currently running on %s\n" % (hostname)) |
118 | 118 |
119 elif sys.argv[1] == "version": | 119 elif sys.argv[1] == "version": |
120 # check the current xena status | 120 # check the current xena status |