aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wqueue2.py
diff options
context:
space:
mode:
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():