ifiguero 2024-03-10 02:14:07 -03:00
parent 3143d3f2ff
commit d6ecf5cbca
2 changed files with 8 additions and 8 deletions

View File

@ -3,17 +3,16 @@ import logging
import os import os
import time import time
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)
if __name__ == '__main__': if __name__ == '__main__':
while True: while True:
o, e = procesa_zip() o, e = procesa_zip()
print(o) print(o)
print(e) print(e)
time.sleep(os.environ.get('INTERVAL')) 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)

View File

@ -114,6 +114,7 @@ services:
- DBSCHEMA=desarrollo1 - DBSCHEMA=desarrollo1
- DBUSER=postgres - DBUSER=postgres
- DBPASS=password - DBPASS=password
- INTERVAL=60
tdtp-proto: tdtp-proto:
build: build: