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

Side by Side Diff: testing/legion/run_task.py

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 months 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 | « testing/legion/rpc_methods.py ('k') | testing/scripts/gtest_perf_test.py » ('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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 """The main task entrypoint.""" 6 """The main task entrypoint."""
7 7
8 import argparse 8 import argparse
9 import logging 9 import logging
10 import socket 10 import socket
(...skipping 16 matching lines...) Expand all
27 parser.add_argument('--controller', 27 parser.add_argument('--controller',
28 help='The ip address of the controller machine') 28 help='The ip address of the controller machine')
29 parser.add_argument('--idle-timeout', type=int, 29 parser.add_argument('--idle-timeout', type=int,
30 default=common_lib.DEFAULT_TIMEOUT_SECS, 30 default=common_lib.DEFAULT_TIMEOUT_SECS,
31 help='The idle timeout for the rpc server in seconds') 31 help='The idle timeout for the rpc server in seconds')
32 args, _ = parser.parse_known_args() 32 args, _ = parser.parse_known_args()
33 33
34 logging.info( 34 logging.info(
35 'Registering with registration server at %s using OTP "%s"', 35 'Registering with registration server at %s using OTP "%s"',
36 args.controller, args.otp) 36 args.controller, args.otp)
37 server = common_lib.ConnectToServer(args.controller).RegisterTask( 37 common_lib.ConnectToServer(args.controller).RegisterTask(
38 args.otp, common_lib.MY_IP) 38 args.otp, common_lib.MY_IP)
39 39
40 server = rpc_server.RPCServer(args.controller, args.idle_timeout) 40 server = rpc_server.RPCServer(args.controller, args.idle_timeout)
41 41
42 server.serve_forever() 42 server.serve_forever()
43 logging.info('Server shutdown complete')
43 return 0 44 return 0
44 45
45 46
46 if __name__ == '__main__': 47 if __name__ == '__main__':
47 sys.exit(main()) 48 sys.exit(main())
OLDNEW
« no previous file with comments | « testing/legion/rpc_methods.py ('k') | testing/scripts/gtest_perf_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698