Changeset 18945 for branches/eam_branch_20080806/ippTasks/diff.pro
- Timestamp:
- Aug 6, 2008, 1:15:06 PM (18 years ago)
- File:
-
- 1 edited
-
branches/eam_branch_20080806/ippTasks/diff.pro (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080806/ippTasks/diff.pro
r18509 r18945 16 16 ### Database lists 17 17 $diffSkycell_DB = 0 18 $diffCleanup_DB = 0 18 19 19 20 ### Check status of diffing tasks 20 21 macro diff.status 21 22 book listbook diffSkyfile 23 book listbook diffCleanup 22 24 end 23 25 … … 25 27 macro diff.reset 26 28 book init diffSkyfile 29 book init diffCleanup 27 30 end 28 31 … … 35 38 active true 36 39 end 40 task diff.cleanup.load 41 active true 42 end 43 task diff.cleanup.run 44 active true 45 end 37 46 end 38 47 … … 43 52 end 44 53 task diff.skycell.run 54 active false 55 end 56 task diff.cleanup.load 57 active false 58 end 59 task diff.cleanup.run 45 60 active false 46 61 end … … 167 182 end 168 183 184 # select images ready for diff analysis 185 # new entries are added to diffPendingImfile 186 # skip already-present entries 187 task diff.cleanup.load 188 host local 189 190 periods -poll $LOADPOLL 191 periods -exec $LOADEXEC 192 periods -timeout 30 193 npending 1 194 active true 195 196 stdout NULL 197 stderr $LOGDIR/diff.cleanup.log 198 199 task.exec 200 if ($DB:n == 0) 201 option DEFAULT 202 command difftool -pendingcleanuprun -limit 20 203 else 204 # save the DB name for the exit tasks 205 option $DB:$diff_cleanup_DB 206 command difftool -pendingcleanuprun -limit 20 -dbname $DB:$diff_cleanup_DB 207 $diff_cleanup_DB ++ 208 if ($diff_cleanup_DB >= $DB:n) set diff_cleanup_DB = 0 209 end 210 end 211 212 # success 213 task.exit 0 214 # convert 'stdout' to book format 215 ipptool2book stdout diffPendingCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT 216 if ($VERBOSE > 2) 217 book listbook diffPendingCleanup 218 end 219 220 # delete existing entries in the appropriate pantaskStates 221 process_cleanup diffPendingCleanup 222 end 223 224 # locked list 225 task.exit default 226 showcommand failure 227 end 228 229 # operation times out? 230 task.exit timeout 231 showcommand timeout 232 end 233 end 234 235 # run the ipp_cleanup.pl script on pending images 236 task diff.cleanup.run 237 periods -poll $RUNPOLL 238 periods -exec $RUNEXEC 239 periods -timeout 60 240 active true 241 242 task.exec 243 book npages diffPendingCleanup -var N 244 if ($N == 0) break 245 if ($NETWORK == 0) break 246 247 # look for new images in diffPendingCleanup (pantaskState == INIT) 248 book getpage diffPendingCleanup 0 -var pageName -key pantaskState INIT 249 if ("$pageName" == "NULL") break 250 251 book setword diffPendingCleanup $pageName pantaskState RUN 252 book getword diffPendingCleanup $pageName camera -var CAMERA 253 book getword diffPendingCleanup $pageName state -var CLEANUP_MODE 254 book getword diffPendingCleanup $pageName diff_id -var DIFF_ID 255 book getword diffPendingCleanup $pageName dbname -var DBNAME 256 257 # specify choice of local or remote host based on camera and diff (class_id) 258 set.host.for.camera $CAMERA FPA 259 260 stdout $LOGDIR/diff.cleanup.log 261 stderr $LOGDIR/diff.cleanup.log 262 263 # XXX is everything listed here needed? 264 $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE 265 add_standard_args run 266 267 # save the pageName for future reference below 268 options $pageName 269 270 # create the command line 271 if ($VERBOSE > 1) 272 echo command $run 273 end 274 command $run 275 end 276 277 # default exit status 278 task.exit default 279 process_exit diffPendingCleanup $options:0 $JOB_STATUS 280 end 281 282 # operation timed out? 283 task.exit timeout 284 showcommand timeout 285 book setword diffPendingCleanup $options:0 pantaskState TIMEOUT 286 end 287 end
Note:
See TracChangeset
for help on using the changeset viewer.
