diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2014-06-08 22:45:56 +0300 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2014-06-08 22:45:56 +0300 |
| commit | 25a683b9d5e6cb37460f37bb5ad8257ed7ce584a (patch) | |
| tree | 64ffdccdc80ae32b97d72f32ce1659e048c3f7c5 /server.py | |
| parent | c6f222c1e4d1a5ed7dfb4017f3bc7d4289642c41 (diff) | |
Add client restart on push
Diffstat (limited to 'server.py')
| -rw-r--r-- | server.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1,3 +1,5 @@ +import subprocess + from datetime import datetime from flask import Flask from flask import json, jsonify, render_template, request @@ -24,6 +26,7 @@ def data(): f.write(request.json['data']) with open(DATA_DIR.child('data.{}.txt'.format(uuid4().hex[:10])), 'w') as f: f.write(request.json['data']) + subprocess.call(['supervisorctl', 'restart', 'client']) return 'ok' if __name__ == '__main__': |
