Commit 5c1733a4 authored by Irving David's avatar Irving David

cambiada la forma de ejecutar el proceso L2ACSL_AreaProcessing.sh

parent c1c0a098
...@@ -17,6 +17,7 @@ from geosentinel import APISentinel, polygonToBox ...@@ -17,6 +17,7 @@ from geosentinel import APISentinel, polygonToBox
from mail.views import wsMail, wsMail2, wsMail3 from mail.views import wsMail, wsMail2, wsMail3
from django.contrib import messages from django.contrib import messages
import base64 import base64
import subprocess
dirname = os.path.dirname(__file__) dirname = os.path.dirname(__file__)
configfile = os.path.join(dirname, '../config/config.json') configfile = os.path.join(dirname, '../config/config.json')
...@@ -33,6 +34,8 @@ API_SENTINEL_PASS = config['API_SENTINEL']['SENTINEL_PASS'] ...@@ -33,6 +34,8 @@ API_SENTINEL_PASS = config['API_SENTINEL']['SENTINEL_PASS']
sys.path.append(SENTINEL_PATH) sys.path.append(SENTINEL_PATH)
sentinel = APISentinel.APISentinel(API_SENTINEL_USER, API_SENTINEL_PASS) sentinel = APISentinel.APISentinel(API_SENTINEL_USER, API_SENTINEL_PASS)
os.environ["PATH"] += os.pathsep + "/home/agei/REPSAT/GeoSentinel/tools"
os.environ["PATH"] += os.pathsep + "/home/agei/REPSAT/GeoSentinel/geosentinel"
# Create your views here. # Create your views here.
...@@ -590,6 +593,10 @@ def Pay(request): ...@@ -590,6 +593,10 @@ def Pay(request):
fidProductsFile.close() fidProductsFile.close()
os.system(SENTINEL_PATH + "/tools/L2ASCL_AreaProcessing.sh " + purchase_dir + "/ 0 > " + purchase_dir + "/L2ASCL_AreaProcessing.log") ###ejecuta el proceso os.system(SENTINEL_PATH + "/tools/L2ASCL_AreaProcessing.sh " + purchase_dir + "/ 0 > " + purchase_dir + "/L2ASCL_AreaProcessing.log") ###ejecuta el proceso
#print(SENTINEL_PATH + "/tools/L2ASCL_AreaProcessing.sh " + purchase_dir + "/ 0 > " + purchase_dir + "/L2ASCL_AreaProcessing.log")
#f.open(purchase_dir + "/L2ASCL_AreaProcessing.log","w")
#subprocess.call("L2ASCL_AreaProcessing.sh " + purchase_dir + "/ 0 > " + purchase_dir + "/L2ASCL_AreaProcessing.log",shell=True)
subprocess.Popen("L2ASCL_AreaProcessing.sh " + purchase_dir + "/ 0 > " + purchase_dir + "/L2ASCL_AreaProcessing.log",shell=True)
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
aria-valuemin="0" aria-valuemax="100" aria-valuemin="0" aria-valuemax="100"
style="width:{{ product.progress }}%"> style="width:{{ product.progress }}%">
<p id="textprogress{{ product.purchase_id }}" style="color: #0a0a0a"> <p id="textprogress{{ product.purchase_id }}" style="color: #0a0a0a">
Downloading... Processing...
</p> </p>
</div> </div>
</div> </div>
......
...@@ -210,7 +210,6 @@ def Reports(request): ...@@ -210,7 +210,6 @@ def Reports(request):
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
def wsProcessProgress(request): def wsProcessProgress(request):
print(request);
if request.is_ajax(): if request.is_ajax():
progress = 0 progress = 0
productList2 = [] productList2 = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment