aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wqueue2.py
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-03-14 17:11:31 +0100
committerVG <vg@devys.org>2016-03-14 17:11:31 +0100
commit976602f3d3d6cd22c7357821117a14b67d9edf46 (patch)
treef52bc6fa70a657cf58c1571e0fb00b77677f9031 /tests/wqueue2.py
parent0eb4d62cf3e1b39540c65acd327925aa3c43947b (diff)
downloadwqueue-976602f3d3d6cd22c7357821117a14b67d9edf46.tar.gz
wqueue-976602f3d3d6cd22c7357821117a14b67d9edf46.tar.bz2
wqueue-976602f3d3d6cd22c7357821117a14b67d9edf46.zip
wip
Diffstat (limited to 'tests/wqueue2.py')
-rwxr-xr-xtests/wqueue2.py17
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():