Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: sky/tools/skydb

Issue 746373002: Convert sky_server over to a go-based http server. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address review comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/tools/sky_server ('k') | sky/tools/skygo/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import logging 7 import logging
8 import os 8 import os
9 from skypy.paths import Paths 9 from skypy.paths import Paths
10 import skypy.configuration as configuration 10 import skypy.configuration as configuration
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 logging.warn( 43 logging.warn(
44 '%s is outside of mojo root, using %s as server root' % 44 '%s is outside of mojo root, using %s as server root' %
45 (path, server_root)) 45 (path, server_root))
46 relative_path = os.path.relpath(path, server_root) 46 relative_path = os.path.relpath(path, server_root)
47 47
48 if self._port_in_use(HTTP_PORT): 48 if self._port_in_use(HTTP_PORT):
49 logging.warn( 49 logging.warn(
50 'Port %s already in use, assuming custom sky_server started.' % 50 'Port %s already in use, assuming custom sky_server started.' %
51 HTTP_PORT) 51 HTTP_PORT)
52 else: 52 else:
53 subprocess.call(os.path.join(self.paths.sky_tools_directory,
54 'download_sky_server'))
53 server_command = [ 55 server_command = [
54 os.path.join(self.paths.sky_tools_directory, 'sky_server'), 56 os.path.join(self.paths.src_root, 'out', 'downloads', 'sky_serve r'),
55 '-t', configuration, 57 '-t', configuration,
56 server_root, 58 server_root,
57 str(HTTP_PORT), 59 str(HTTP_PORT),
58 ] 60 ]
59 self._sky_server = subprocess.Popen(server_command) 61 self._sky_server = subprocess.Popen(server_command)
60 return 'http://localhost:%s/%s' % (HTTP_PORT, relative_path) 62 return 'http://localhost:%s/%s' % (HTTP_PORT, relative_path)
61 63
62 def _in_chromoting(self): 64 def _in_chromoting(self):
63 return os.environ.get('CHROME_REMOTE_DESKTOP_SESSION', False) 65 return os.environ.get('CHROME_REMOTE_DESKTOP_SESSION', False)
64 66
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 107
106 108
107 if __name__ == '__main__': 109 if __name__ == '__main__':
108 skydb = SkyDebugger() 110 skydb = SkyDebugger()
109 try: 111 try:
110 skydb.main() 112 skydb.main()
111 except (KeyboardInterrupt, SystemExit): 113 except (KeyboardInterrupt, SystemExit):
112 pass 114 pass
113 finally: 115 finally:
114 skydb.shutdown() 116 skydb.shutdown()
OLDNEW
« no previous file with comments | « sky/tools/sky_server ('k') | sky/tools/skygo/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698