OLD | NEW |
(Empty) | |
| 1 import time |
| 2 import sys |
| 3 import logging |
| 4 |
| 5 FORMAT='%(asctime)s - %(process)s - %(name)s - %(levelname)s - %(message)s' |
| 6 logging.basicConfig( |
| 7 level=logging.DEBUG, format=FORMAT, stream=sys.stdout) |
| 8 |
| 9 if '--spawn' in sys.argv: |
| 10 logging.warn('tan: spwaning') |
| 11 sys.stdout.flush() |
| 12 import subprocess |
| 13 subprocess.call( |
| 14 ['python', '/usr/local/google/home/tandrii/bin/depot_tools/slowwwww.py'], |
| 15 stderr=subprocess.PIPE) |
| 16 logging.warn('tan: finished!') |
| 17 sys.stdout.flush() |
| 18 else: |
| 19 logging.info('tan: sleeping') |
| 20 sys.stdout.flush() |
| 21 for i in xrange(6): |
| 22 time.sleep(3) |
| 23 logging.debug('tan: sleep partial %d', i) |
| 24 logging.info('tan: sleeping no more.') |
| 25 sys.stdout.flush() |
OLD | NEW |