20 lines
470 B
Python
20 lines
470 B
Python
|
# coding: utf-8
|
||
|
import logging
|
||
|
import os
|
||
|
import time
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
while True:
|
||
|
o, e = procesa_zip()
|
||
|
print(o)
|
||
|
print(e)
|
||
|
time.sleep(os.environ.get('INTERVAL'))
|
||
|
|
||
|
|
||
|
|
||
|
def procesa_zip():
|
||
|
import subprocess
|
||
|
cmd = subprocess.Popen([u"/usr/bin/python /srv/project/manage.py procesa_zip"], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||
|
cmd.wait()
|
||
|
return (cmd.stdout, cmd.stderr)
|