Skip to content
Browse files

Add missing string in worker.py

  • Loading branch information...
1 parent fdf4e49 commit 53cc3c68ec70ca52c455a6c1e24403de2891daf1 Zack Moratto committed Mar 17, 2013
Showing with 20 additions and 20 deletions.
  1. +1 −1 ctx_processor.py
  2. +19 −19 ctx_worker.py
View
2 ctx_processor.py
@@ -46,7 +46,7 @@ def draw_screen_status():
else:
print "Skipping %s" % line
- while len(requests) > 9:
+ while len(requests) > 19:
draw_screen_status()
time.sleep(0.5)
View
38 ctx_worker.py
@@ -74,58 +74,58 @@ def task_process_ctx( gearman_worker, gearman_job ):
gearman_worker.send_job_status( gearman_job, 2, 12 )
if not os.path.exists(arguments[0]+".IMG"):
if not run_cmd( "grep %s %s/ctx_url_lookup2 | xargs curl -O" % (arguments[0],ctx_dir) ):
- return
+ return "Failed"
# download right
gearman_worker.send_job_status( gearman_job, 3, 12 )
if not os.path.exists(arguments[1]+".IMG"):
if not run_cmd( "grep %s %s/ctx_url_lookup2 | xargs curl -O" % (arguments[1],ctx_dir) ):
- return
+ return "Failed"
# calibrate
gearman_worker.send_job_status( gearman_job, 4, 12 )
if not run_cmd( "mroctx2isis from=%s.IMG to=%s.1.cub | tee -a log" % (arguments[0],arguments[0]) ):
- return
+ return "Failed"
if not run_cmd( "mroctx2isis from=%s.IMG to=%s.1.cub | tee -a log" % (arguments[1],arguments[1]) ):
- return
+ return "Failed"
if not run_cmd( "spiceinit from=%s.1.cub | tee -a log" % arguments[0] ):
- return
+ return "Failed"
if not run_cmd( "spiceinit from=%s.1.cub | tee -a log" % arguments[1] ):
- return
+ return "Failed"
if not run_cmd( "ctxcal from=%s.1.cub to=%s.2.cub | tee -a log" % (arguments[0],arguments[0]) ):
- return
+ return "Failed"
if not run_cmd( "ctxcal from=%s.1.cub to=%s.2.cub | tee -a log" % (arguments[1],arguments[1]) ):
- return
+ return "Failed"
if not run_cmd( "rm *1.cub" ):
- return
+ return "Failed"
# pprc
gearman_worker.send_job_status( gearman_job, 5, 12 )
default = open('stereo.default','w')
default.write("alignment-method homography\nforce-use-entire-range # Use entire input range\nprefilter-mode 2\nprefilter-kernel-width 1.4\ncost-mode 2\ncorr-kernel 21 21\nsubpixel-mode 2\nsubpixel-kernel 19 19\nrm-half-kernel 5 5\nrm-min-matches 60\nrm-threshold 3\nrm-cleanup-passes 1\nnear-universe-radius 0.0\nfar-universe-radius 0.0\n")
default.close()
if not run_cmd( "stereo_pprc *.2.cub %s | tee -a log" % prefix):
- return
+ return "Failed"
# corr
gearman_worker.send_job_status( gearman_job, 6, 12 )
if not run_cmd( "stereo_corr *.2.cub %s | tee -a log" % prefix, 3600*2):
- return
+ return "Failed"
# rfne
gearman_worker.send_job_status( gearman_job, 7, 12 )
if not run_cmd( "stereo_rfne *.2.cub %s | tee -a log" % prefix, 3600*6):
- return
+ return "Failed"
# fltr
gearman_worker.send_job_status( gearman_job, 8, 12 )
if not run_cmd( "stereo_fltr *.2.cub %s | tee -a log" % prefix):
- return
+ return "Failed"
# tri
gearman_worker.send_job_status( gearman_job, 9, 12 )
if not run_cmd( "stereo_tri *.2.cub %s | tee -a log" % prefix):
- return
+ return "Failed"
# dem
gearman_worker.send_job_status( gearman_job, 10, 12 )
@@ -135,18 +135,18 @@ def task_process_ctx( gearman_worker, gearman_job ):
else:
lat = int(arguments[0][19:21])
if not run_cmd( "point2dem %s-PC.tif --orthoimage %s-L.tif --tr 30 --nodata -32767 --t_srs '+proj=eqc +lat_ts=%i +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=3396000 +b=3396000 +units=m +no_defs' | tee -a log" % (prefix,prefix,lat)):
- return
+ return "Failed"
# move and clean up
gearman_worker.send_job_status( gearman_job, 11, 12 )
if not run_cmd( "mv %s-DEM.tif %s/DEM/" % (prefix,ctx_dir)):
- return
+ return "Failed"
if not run_cmd( "mv %s-DRG.tif %s/DRG/" % (prefix,ctx_dir)):
- return
+ return "Failed"
if not run_cmd( "parallel bzip2 -z -9 ::: *cub *IMG"):
- return
+ return "Failed"
if not run_cmd( "rm -rf %s" % job_name):
- return
+ return "Failed"
return "Finished"

0 comments on commit 53cc3c6

Please sign in to comment.
Something went wrong with that request. Please try again.