diff options
author | VG <vg@devys.org> | 2016-03-14 17:11:31 +0100 |
---|---|---|
committer | VG <vg@devys.org> | 2016-03-14 17:11:31 +0100 |
commit | 976602f3d3d6cd22c7357821117a14b67d9edf46 (patch) | |
tree | f52bc6fa70a657cf58c1571e0fb00b77677f9031 /tests/wqueue2.py | |
parent | 0eb4d62cf3e1b39540c65acd327925aa3c43947b (diff) | |
download | wqueue-976602f3d3d6cd22c7357821117a14b67d9edf46.tar.gz wqueue-976602f3d3d6cd22c7357821117a14b67d9edf46.tar.bz2 wqueue-976602f3d3d6cd22c7357821117a14b67d9edf46.zip |
wip
Diffstat (limited to 'tests/wqueue2.py')
-rwxr-xr-x | tests/wqueue2.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/wqueue2.py b/tests/wqueue2.py index d53da36..a78f315 100755 --- a/tests/wqueue2.py +++ b/tests/wqueue2.py @@ -10,6 +10,7 @@ async def test(): async def manage_client(reader, writer): + print('='*40) print('manage_client created') print('called on connection only ?') await asyncio.sleep(1) @@ -20,6 +21,22 @@ async def manage_client(reader, writer): break print('line', line) writer.write(line) + writer.close() + print('end of manage_client') + + +async def manage_jobs(): + queue = [] + while True: + async with open('queue.txt') as f: + line = await next(f) + if not line: + # schedule new job + print('executing next scheduled job') + +def read_next_job_arg(): + with open(QUEUE_FILE, 'r') as f: + line = f.readline() def main(): |