Tornado 6.1 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import time from datetime import timedelta from work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == (fetched | dead) print("Done in %d seconds by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 6.0 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import time from datetime import timedelta from work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == fetched print("Done in %d seconds, fetched by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 4.5 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python import time from datetime import timedelta try: then wait for the work queue to be empty. for _ in range(concurrency): worker() yield q.join(timeout=timedelta(seconds=300)) assert fetching == fetched print('Done in %d seconds, fetched by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 6.1 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import time from datetime import timedelta from for the work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == (fetched | dead) print("Done in %d seconds, fetched Tornado by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 4.5 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python import time from datetime import timedelta try: workers, then wait for the work queue to be empty. for _ in range(concurrency): worker() yield q.join(timeout=timedelta(seconds=300)) assert fetching == fetched print('Done in %d seconds, fetched %s URLs Chapter 4. Documentation Tornado Documentation, Release 4.5.3 settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import time from datetime import timedelta from for the work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == fetched print('Done in %d seconds, fetched %s URLs Tornado by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.0 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import time from datetime import timedelta from for the work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == fetched print("Done in %d seconds, fetched %s URLs Tornado by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.4 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import asyncio import time from datetime import for the work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == (fetched | dead) print("Done in %d seconds, fetched Tornado by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.2 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import asyncio import time from datetime import for the work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == (fetched | dead) print("Done in %d seconds, fetched Tornado by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 6.4 Documentation
worker’s call to task_done decrements the counter to zero. The main coroutine, which is waiting for join, is unpaused and finishes. #!/usr/bin/env python3 import asyncio import time from datetime import for the work queue to be empty. workers = gen.multi([worker() for _ in range(concurrency)]) await q.join(timeout=timedelta(seconds=300)) assert fetching == (fetched | dead) print("Done in %d seconds, fetched Tornado by specifying the static_path setting in your application: settings = { "static_path": os.path.join(os.path.dirname(__file__), "static"), "cookie_secret": "__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__"0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













