Changeset 25027 for branches/pap/ippTasks/diff.pro
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/diff.pro (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ippTasks/diff.pro
r23230 r25027 10 10 ### Initialise the books containing the tasks to do 11 11 book init diffSkyfile 12 book init diffCleanup12 #book init diffCleanup 13 13 14 14 ### Database lists 15 15 $diffSkycell_DB = 0 16 $diffCleanup_DB = 016 #$diffCleanup_DB = 0 17 17 18 18 ### Check status of diffing tasks 19 19 macro diff.status 20 20 book listbook diffSkyfile 21 book listbook diffCleanup21 # book listbook diffCleanup 22 22 end 23 23 … … 25 25 macro diff.reset 26 26 book init diffSkyfile 27 book init diffCleanup27 # book init diffCleanup 28 28 end 29 29 … … 48 48 end 49 49 50 macro diff.cleanup.on51 task diff.cleanup.load52 active true53 end54 task diff.cleanup.run55 active true56 end57 end58 59 macro diff.cleanup.off60 task diff.cleanup.load61 active false62 end63 task diff.cleanup.run64 active false65 end66 end50 # macro diff.cleanup.on 51 # task diff.cleanup.load 52 # active true 53 # end 54 # task diff.cleanup.run 55 # active true 56 # end 57 # end 58 59 # macro diff.cleanup.off 60 # task diff.cleanup.load 61 # active false 62 # end 63 # task diff.cleanup.run 64 # active false 65 # end 66 # end 67 67 68 68 … … 81 81 82 82 task.exec 83 if ($LABEL:n == 0) break 83 84 $run = difftool -todiffskyfile 84 85 if ($DB:n == 0) … … 92 93 end 93 94 add_poll_args run 95 add_poll_labels run 94 96 command $run 95 97 end … … 144 146 book getword diffSkyfile $pageName skycell_id -var SKYCELL_ID 145 147 book getword diffSkyfile $pageName camera -var CAMERA 148 book getword diffSkyfile $pageName bothways -var BOTHWAYS 146 149 book getword diffSkyfile $pageName workdir -var WORKDIR_TEMPLATE 147 150 book getword diffSkyfile $pageName dbname -var DBNAME … … 162 165 163 166 $run = diff_skycell.pl --threads @MAX_THREADS@ --diff_id $DIFF_ID --skycell_id $SKYCELL_ID --diff_skyfile_id $DIFF_SKYFILE_ID --outroot $outroot --redirect-output 167 if ("$BOTHWAYS" == "T") 168 $run = $run --inverse 169 end 164 170 add_standard_args run 165 171 … … 193 199 end 194 200 195 # select images ready for diff analysis 196 # new entries are added to diffPendingImfile 197 # skip already-present entries 198 task diff.cleanup.load 199 host local 200 201 periods -poll $LOADPOLL 202 periods -exec $LOADEXEC 203 periods -timeout 30 204 npending 1 205 active false 206 207 stdout NULL 208 stderr $LOGDIR/diff.cleanup.log 209 210 task.exec 211 $run = difftool -pendingcleanuprun 212 if ($DB:n == 0) 213 option DEFAULT 214 else 215 # save the DB name for the exit tasks 216 option $DB:$diffCleanup_DB 217 $run = $run -dbname $DB:$diffCleanup_DB 218 $diffCleanup_DB ++ 219 if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0 220 end 221 add_poll_args run 222 command $run 223 end 224 225 # success 226 task.exit 0 227 # convert 'stdout' to book format 228 ipptool2book stdout diffCleanup -key diff_id:skycell_id -uniq -setword dbname $options:0 -setword pantaskState INIT 229 if ($VERBOSE > 2) 230 book listbook diffCleanup 231 end 232 233 # delete existing entries in the appropriate pantaskStates 234 process_cleanup diffCleanup 235 end 236 237 # locked list 238 task.exit default 239 showcommand failure 240 end 241 242 task.exit crash 243 showcommand crash 244 end 245 246 # operation times out? 247 task.exit timeout 248 showcommand timeout 249 end 250 end 251 252 # run the ipp_cleanup.pl script on pending images 253 task diff.cleanup.run 254 periods -poll $RUNPOLL 255 periods -exec $RUNEXEC 256 periods -timeout 60 257 active false 258 259 task.exec 260 book npages diffCleanup -var N 261 if ($N == 0) break 262 if ($NETWORK == 0) break 201 # # select images ready for diff analysis 202 # # new entries are added to diffPendingImfile 203 # # skip already-present entries 204 # task diff.cleanup.load 205 # host local 206 207 # periods -poll $LOADPOLL 208 # periods -exec $LOADEXEC 209 # periods -timeout 30 210 # npending 1 211 # active false 212 213 # stdout NULL 214 # stderr $LOGDIR/diff.cleanup.log 215 216 # task.exec 217 # if ($LABEL:n == 0) break 218 # $run = difftool -pendingcleanuprun 219 # if ($DB:n == 0) 220 # option DEFAULT 221 # else 222 # # save the DB name for the exit tasks 223 # option $DB:$diffCleanup_DB 224 # $run = $run -dbname $DB:$diffCleanup_DB 225 # $diffCleanup_DB ++ 226 # if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0 227 # end 228 # add_poll_args run 229 # add_poll_labels run 230 # command $run 231 # end 232 233 # # success 234 # task.exit 0 235 # # convert 'stdout' to book format 236 # ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT 237 # if ($VERBOSE > 2) 238 # book listbook diffCleanup 239 # end 240 241 # # delete existing entries in the appropriate pantaskStates 242 # process_cleanup diffCleanup 243 # end 244 245 # # locked list 246 # task.exit default 247 # showcommand failure 248 # end 249 250 # task.exit crash 251 # showcommand crash 252 # end 253 254 # # operation times out? 255 # task.exit timeout 256 # showcommand timeout 257 # end 258 # end 259 260 # # run the ipp_cleanup.pl script on pending images 261 # task diff.cleanup.run 262 # periods -poll $RUNPOLL 263 # periods -exec $RUNEXEC 264 # periods -timeout 60 265 # active false 266 267 # task.exec 268 # book npages diffCleanup -var N 269 # if ($N == 0) break 270 # if ($NETWORK == 0) break 263 271 264 # look for new images in diffCleanup (pantaskState == INIT)265 book getpage diffCleanup 0 -var pageName -key pantaskState INIT266 if ("$pageName" == "NULL") break267 268 book setword diffCleanup $pageName pantaskState RUN269 book getword diffCleanup $pageName camera -var CAMERA270 book getword diffCleanup $pageName state -var CLEANUP_MODE271 book getword diffCleanup $pageName diff_id -var DIFF_ID272 book getword diffCleanup $pageName dbname -var DBNAME273 274 # specify choice of local or remote host based on camera and diff (class_id)275 set.host.for.camera $CAMERA FPA276 277 stdout $LOGDIR/diff.cleanup.log278 stderr $LOGDIR/diff.cleanup.log279 280 # XXX is everything listed here needed?281 $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE282 add_standard_args run283 284 # save the pageName for future reference below285 options $pageName286 287 # create the command line288 if ($VERBOSE > 1)289 echo command $run290 end291 command $run292 end293 294 # default exit status295 task.exit default296 process_exit diffCleanup $options:0 $JOB_STATUS297 end298 299 task.exit crash300 showcommand crash301 book setword diffCleanup $options:0 pantaskState CRASH302 end303 304 # operation timed out?305 task.exit timeout306 showcommand timeout307 book setword diffCleanup $options:0 pantaskState TIMEOUT308 end309 end272 # # look for new images in diffCleanup (pantaskState == INIT) 273 # book getpage diffCleanup 0 -var pageName -key pantaskState INIT 274 # if ("$pageName" == "NULL") break 275 276 # book setword diffCleanup $pageName pantaskState RUN 277 # book getword diffCleanup $pageName camera -var CAMERA 278 # book getword diffCleanup $pageName state -var CLEANUP_MODE 279 # book getword diffCleanup $pageName diff_id -var DIFF_ID 280 # book getword diffCleanup $pageName dbname -var DBNAME 281 282 # # specify choice of local or remote host based on camera and diff (class_id) 283 # set.host.for.camera $CAMERA FPA 284 285 # stdout $LOGDIR/diff.cleanup.log 286 # stderr $LOGDIR/diff.cleanup.log 287 288 # # XXX is everything listed here needed? 289 # $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE 290 # add_standard_args run 291 292 # # save the pageName for future reference below 293 # options $pageName 294 295 # # create the command line 296 # if ($VERBOSE > 1) 297 # echo command $run 298 # end 299 # command $run 300 # end 301 302 # # default exit status 303 # task.exit default 304 # process_exit diffCleanup $options:0 $JOB_STATUS 305 # end 306 307 # task.exit crash 308 # showcommand crash 309 # book setword diffCleanup $options:0 pantaskState CRASH 310 # end 311 312 # # operation timed out? 313 # task.exit timeout 314 # showcommand timeout 315 # book setword diffCleanup $options:0 pantaskState TIMEOUT 316 # end 317 # end
Note:
See TracChangeset
for help on using the changeset viewer.
