Changeset 25027 for branches/pap/ippTasks/camera.pro
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/camera.pro (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ippTasks/camera.pro
r23230 r25027 7 7 8 8 book init camPendingExp 9 book init camPendingCleanup10 9 11 10 macro camera.status 12 11 book listbook camPendingExp 13 book listbook camPendingCleanup14 12 end 15 13 16 14 macro camera.reset 17 15 book init camPendingExp 18 book init camPendingCleanup19 16 end 20 17 … … 37 34 end 38 35 39 macro camera.cleanup.on40 task camera.cleanup.load41 active true42 end43 task camera.cleanup.run44 active true45 end46 end47 48 macro camera.cleanup.off49 task camera.cleanup.load50 active false51 end52 task camera.cleanup.run53 active false54 end55 end56 57 36 # this variable will cycle through the known database names 58 37 $camera_DB = 0 38 $camera_revert_DB = 0 59 39 60 40 # select images ready for camera analysis … … 73 53 74 54 task.exec 55 if ($LABEL:n == 0) break 75 56 $run = camtool -pendingexp 76 57 if ($DB:n == 0) … … 84 65 end 85 66 add_poll_args run 67 add_poll_labels run 86 68 command $run 87 69 end … … 197 179 end 198 180 199 # this variable will cycle through the known database names 200 $camera_cleanup_DB = 0 201 202 # select images ready for cam analysis 203 # new entries are added to camPendingImfile 204 # skip already-present entries 205 task camera.cleanup.load 181 task camera.revert 206 182 host local 207 183 208 periods -poll $LOADPOLL209 periods -exec $LOADEXEC210 periods -timeout 30184 periods -poll 5.0 185 periods -exec 60.0 186 periods -timeout 120.0 211 187 npending 1 212 active false213 188 214 189 stdout NULL 215 stderr $LOGDIR/ camera.cleanup.log190 stderr $LOGDIR/revert.log 216 191 217 192 task.exec 218 $run = camtool -pendingcleanuprun 193 if ($LABEL:n == 0) break 194 $run = camtool -revertprocessedexp 219 195 if ($DB:n == 0) 220 196 option DEFAULT 221 197 else 222 198 # save the DB name for the exit tasks 223 option $DB:$camera_ cleanup_DB224 $run = $run -dbname $DB:$camera_ cleanup_DB225 $camera_ cleanup_DB ++226 if ($camera_ cleanup_DB >= $DB:n) set camera_cleanup_DB = 0227 end 228 add_poll_ args run199 option $DB:$camera_revert_DB 200 $run = $run -dbname $DB:$camera_revert_DB 201 $camera_revert_DB ++ 202 if ($camera_revert_DB >= $DB:n) set camera_revert_DB = 0 203 end 204 add_poll_labels run 229 205 command $run 230 206 end … … 232 208 # success 233 209 task.exit 0 234 # convert 'stdout' to book format235 ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT236 if ($VERBOSE > 2)237 book listbook camPendingCleanup238 end239 240 # delete existing entries in the appropriate pantaskStates241 process_cleanup camPendingCleanup242 210 end 243 211 … … 256 224 end 257 225 end 258 259 # run the ipp_cleanup.pl script on pending images260 task camera.cleanup.run261 periods -poll $RUNPOLL262 periods -exec $RUNEXEC263 periods -timeout 60264 active false265 266 task.exec267 book npages camPendingCleanup -var N268 if ($N == 0) break269 if ($NETWORK == 0) break270 271 # look for new images in camPendingCleanup (pantaskState == INIT)272 book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT273 if ("$pageName" == "NULL") break274 275 book setword camPendingCleanup $pageName pantaskState RUN276 book getword camPendingCleanup $pageName camera -var CAMERA277 book getword camPendingCleanup $pageName state -var CLEANUP_MODE278 book getword camPendingCleanup $pageName cam_id -var CAM_ID279 book getword camPendingCleanup $pageName dbname -var DBNAME280 281 # specify choice of local or remote host based on camera and cam (class_id)282 set.host.for.camera $CAMERA FPA283 284 stdout $LOGDIR/camera.cleanup.log285 stderr $LOGDIR/camera.cleanup.log286 287 # XXX is everything listed here needed?288 $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE289 add_standard_args run290 291 # save the pageName for future reference below292 options $pageName293 294 # create the command line295 if ($VERBOSE > 1)296 echo command $run297 end298 command $run299 end300 301 # default exit status302 task.exit default303 process_exit camPendingCleanup $options:0 $JOB_STATUS304 end305 306 task.exit crash307 showcommand crash308 book setword camPendingCleanup $options:0 pantaskState CRASH309 end310 311 # operation timed out?312 task.exit timeout313 showcommand timeout314 book setword camPendingCleanup $options:0 pantaskState TIMEOUT315 end316 end
Note:
See TracChangeset
for help on using the changeset viewer.
