File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ install:
30
30
- pip install attrs>17.4.0
31
31
- pip install --pre -r jupyterhub/dev-requirements.txt
32
32
- pip install --pre -e jupyterhub
33
+ - pip install --pre -f travis-wheels/wheelhouse -r requirements.txt
33
34
34
35
script :
35
36
- travis_retry py.test --lf --cov batchspawner batchspawner/tests -v
Original file line number Diff line number Diff line change 15
15
* remote execution via submission of templated scripts
16
16
* job names instead of PIDs
17
17
"""
18
+ import asyncio
19
+ from async_generator import async_generator , yield_ , yield_from_
18
20
import pwd
19
21
import os
20
22
import re
23
+ import sys
21
24
22
25
import xml .etree .ElementTree as ET
23
26
@@ -411,6 +414,23 @@ def stop(self, now=False):
411
414
self .job_id , self .current_ip , self .port )
412
415
)
413
416
417
+ @async_generator
418
+ async def progress (self ):
419
+ while True :
420
+ if self .state_ispending ():
421
+ await yield_ ({
422
+ "message" : "Pending in queue..." ,
423
+ })
424
+ elif self .state_isrunning ():
425
+ await yield_ ({
426
+ "message" : "Cluster job running... waiting to connect" ,
427
+ })
428
+ return
429
+ else :
430
+ await yield_ ({
431
+ "message" : "Unknown status..." ,
432
+ })
433
+ await gen .sleep (.1 )
414
434
415
435
class BatchSpawnerRegexStates (BatchSpawnerBase ):
416
436
"""Subclass of BatchSpawnerBase that uses config-supplied regular expressions
Original file line number Diff line number Diff line change
1
+ async_generator >= 1.8
1
2
jinja2
2
3
jupyterhub >= 0.5
You can’t perform that action at this time.
0 commit comments