2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-14 00:54:07 +00:00
This commit is contained in:
vishalseshagiri 2017-08-03 15:58:30 +05:30
parent 39828590e7
commit 1f2e8eb0e8

View File

@ -3,7 +3,6 @@ start_time = datetime.datetime.now().time()
bench_start = 'docker exec -i frappe bash -c "bench start"' bench_start = 'docker exec -i frappe bash -c "bench start"'
process = subprocess.Popen(bench_start, stdout=subprocess.PIPE , shell=True) process = subprocess.Popen(bench_start, stdout=subprocess.PIPE , shell=True)
r = None
def print_out(val,delay): def print_out(val,delay):
while 1: while 1:
@ -13,6 +12,7 @@ def print_out(val,delay):
print(result) print(result)
elif val == 2: elif val == 2:
try: try:
global r
r = requests.get("http://site1.local:8000") r = requests.get("http://site1.local:8000")
print(r) print(r)
except requests.exceptions.ConnectionError as e: except requests.exceptions.ConnectionError as e:
@ -22,9 +22,8 @@ _thread.start_new_thread(print_out, (1, 1))
#result, error = process.communicate() #result, error = process.communicate()
_thread.start_new_thread(print_out, (2, 1)) _thread.start_new_thread(print_out, (2, 1))
time.sleep(45) time.sleep(30)
process.kill() process.kill()
assert '<title> Login </title>' in str(r.content) assert '<title> Login </title>' in str(r.content)
#os.killpg(os.getpgid(process.pid), signal.SIGTERM) # Kill bench start