Final docker setup

This commit is contained in:
vishalseshagiri
2017-07-31 15:51:51 +05:30
parent f04cddcd63
commit ac89a5d001
14594 changed files with 1621465 additions and 44 deletions

21
redis_version.py Normal file
View File

@@ -0,0 +1,21 @@
import subprocess
import re
command_out_string = subprocess.check_output('redis-cli -h redis -c INFO',shell=True)
#command_out_string = "cats \nare smarter than dogs"
#output = subprocess.check_output(('grep', 'redis_version'), stdin=version_string.stdout)
#print(command_out_string)
#output = command_out_string.split('\n')
#print(output)
try:
version = re.match(r'(.*)redis_version(.+?)\n', command_out_string, re.M|re.I|re.DOTALL|re.S)
print(version.group(2).strip(':'))
except:
print("Version not found")
#version_string.wait()
#out,err = version_string.communicate()
#print(out, err)