Permalink
Browse files

Fix typo

  • Loading branch information...
1 parent 488338d commit 84887c02e03a829b5ee1fb531ba6f6fd70305682 Zack Moratto committed Mar 18, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 ctx_worker.py
View
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import gearman, socket, time, os, sys, subprocess, threading, sys
+import gearman, socket, time, os, sys, subprocess, threading, sys, signal
gm_worker = gearman.GearmanWorker(['localhost'])
ctx_dir=os.getcwd()
@@ -38,8 +38,10 @@ def process_timeout( p ):
if p.poll() == None:
try:
print "Process taking too long to complete"
- p.killpg(pro.pid, signal.SIGTERM)
- except:
+ os.killpg(p.pid, signal.SIGTERM)
+ except Exception as e:
+ print "Exception cause "
+ print e
pass
# Helper function to run command
@@ -104,7 +106,7 @@ def task_process_ctx( gearman_worker, gearman_job ):
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):
+ if not run_cmd( "stereo_pprc *.2.cub %s | tee -a log" % prefix, 10):
return "Failed"
# corr

0 comments on commit 84887c0

Please sign in to comment.