Changeset 34781
- Timestamp:
- Dec 7, 2012, 7:33:15 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/ippTasks/bg.regeneration.pro
r34745 r34781 91 91 $run = $run -dbname $DB:$bgRegWarp_DB 92 92 $bgRegWarp_DB ++ 93 if ($bgRegWarp_DB >= $DB:n n) set bgRegWarp_DB = 093 if ($bgRegWarp_DB >= $DB:n) set bgRegWarp_DB = 0 94 94 end 95 95 add_poll_args run … … 103 103 task.exit 0 104 104 # convert 'stdout' to book format 105 ipptool2book stdout bgRegWarp -key warp_id:skycell_id -uniq -setword -dbname $options:0 -setword pantaskState INIT105 ipptool2book stdout bgRegWarp -key warp_id:skycell_id -uniq -setword dbname $options:0 -setword pantaskState INIT 106 106 if ($VERBOSE > 2) 107 107 book listbook bgRegWarp … … 148 148 book getword bgRegWarp $pageName skycell_id -var SKYCELL_ID 149 149 book getword bgRegWarp $pageName camera -var CAMERA 150 book getword bgRegWarp $pageName dbname -var DBNAME 150 151 151 152 set.host.for.skycell $SKYCELL_ID … … 154 155 stderr $LOGDIR/bgreg.warp.log 155 156 156 $run = regenerate_background.pl --stage _id $STAGE_ID --skycell_id $SKYCELL_ID --camera $CAMERA157 $run = regenerate_background.pl --stage warp --stage_id $STAGE_ID --skycell_id $SKYCELL_ID --camera $CAMERA 157 158 158 159 add_standard_args run … … 185 186 end 186 187 187 188 # Load task for warp 189 task bgreg.warp.load 188 # Load task for stack 189 task bgreg.stack.load 190 190 host local 191 191 … … 196 196 197 197 stdout NULL 198 stderr $LOGDIR/bgreg. warp.load198 stderr $LOGDIR/bgreg.stack.load 199 199 200 200 task.exec 201 201 if ($LABEL:n == 0) break 202 $run = warptool -warped -background_model 0 203 if ($DB:n == 0) 204 option DEFAULT 205 else 206 #save the DB naem for the exit tasks 207 option $DB:$bgRegWarp_DB 208 $run = $run -dbname $DB:$bgRegWarp_DB 209 $bgRegWarp_DB ++ 210 if ($bgRegWarp_DB >= $DB:nn) set bgRegWarp_DB = 0 211 end 212 add_poll_args run 213 add_poll_labels run 214 # change the limit? 215 $run = $run -limit $POLL_LIMIT_BGREG 216 command $run 217 end 218 219 # success 220 task.exit 0 221 # convert 'stdout' to book format 222 ipptool2book stdout bgRegWarp -key warp_id:skycell_id -uniq -setword -dbname $options:0 -setword pantaskState INIT 223 if ($VERBOSE > 2) 224 book listbook bgRegWarp 225 end 226 227 # delete existing entries in the appropriate pantaskStates 228 process_cleanup bgRegWarp 229 end 230 231 # locked list 232 task.exit default 233 showcommand failure 234 end 235 236 task.exit crash 237 showcommand crash 238 end 239 240 # operation times out? 241 task.exit timeout 242 showcommand timeout 243 end 244 end 245 246 task bgreg.warp.run 247 periods -poll $RUNPOLL 248 periods -exec $RUNEXEC 249 periods -timeout 60 250 251 task.exec 252 # if we can't exec, set the retry time long 253 periods -exec $RUNEXEC 254 255 book npages bgRegWarp -var N 256 if ($N == 0) break 257 if ($NETWORK == 0) break 258 259 # look for new pages 260 book getpage bgRegWarp 0 -var pageName -key pantaskState INIT 261 if ("$pageName" == "NULL") break 262 263 book setword bgRegWarp $pageName pantaskState RUN 264 book getword bgRegWarp $pageName warp_id -var STAGE_ID 265 book getword bgRegWarp $pageName skycell_id -var SKYCELL_ID 266 book getword bgRegWarp $pageName camera -var CAMERA 267 268 set.host.for.skycell $SKYCELL_ID 269 270 stdout $LOGDIR/bgreg.warp.log 271 stderr $LOGDIR/bgreg.warp.log 272 273 $run = regenerate_background.pl --stage warp --stage_id $STAGE_ID --skycell_id $SKYCELL_ID --camera $CAMERA 274 275 add_standard_args run 276 options $pageName 277 278 if ($VERBOSE > 1) 279 echo command $run 280 end 281 periods -exec 0.05 282 command $run 283 end 284 285 # default exit status 286 task.exit default 287 process_exit bgRegWarp $options:0 $JOB_STATUS 288 end 289 290 # locked list 291 task.exit crash 292 showcommand crash 293 echo "hostname: $JOB_HOSTNAME" 294 book setword bgRegWarp $options:0 pantasksState CRASH 295 end 296 297 # operation timed out 298 task.exit timeout 299 showcommand timeout 300 book setword bgRegWarp $options:0 pantaskState TIMEOUT 301 end 302 end 303 304 # Load task for stack 305 task bgreg.stack.load 306 host local 307 308 periods -poll $LOADPOLL 309 periods -poll $LOADEXEC 310 periods -timeout 30 311 npending 1 312 313 stdout NULL 314 stderr $LOGDIR/bgreg.stack.load 315 316 task.exec 317 if ($LABEL:n == 0) break 318 $run = stacktool -sumskyfile -background_model 0 202 $run = stacktool -tobkg 319 203 if ($DB:n == 0) 320 204 option DEFAULT … … 324 208 $run = $run -dbname $DB:$bgRegStack_DB 325 209 $bgRegStack_DB ++ 326 if ($bgRegStack_DB >= $DB:n n) set bgRegStack_DB = 0210 if ($bgRegStack_DB >= $DB:n) set bgRegStack_DB = 0 327 211 end 328 212 add_poll_args run … … 336 220 task.exit 0 337 221 # convert 'stdout' to book format 338 ipptool2book stdout bgRegStack -key stack_id:skycell_id -uniq -setword -dbname $options:0 -setword pantaskState INIT222 ipptool2book stdout bgRegStack -key stack_id:skycell_id -uniq -setword dbname $options:0 -setword pantaskState INIT 339 223 if ($VERBOSE > 2) 340 224 book listbook bgRegStack … … 381 265 book getword bgRegStack $pageName skycell_id -var SKYCELL_ID 382 266 book getword bgRegStack $pageName camera -var CAMERA 383 267 book getword bgRegStack $pageName dbname -var DBNAME 384 268 set.host.for.skycell $SKYCELL_ID 385 269
Note:
See TracChangeset
for help on using the changeset viewer.
