Changeset 18381
- Timestamp:
- Jun 30, 2008, 10:03:43 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/pstamp.pro (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/pstamp.pro
r16956 r18381 1 1 2 # $VERBOSE = 3 3 2 #$VERBOSE = 3 3 4 # these variables wil cycle through the known database names 5 6 $pstampDS_DB = 0 7 $pstampReq_DB = 0 4 8 $pstampJob_DB = 0 9 $pstampFin_DB = 0 5 10 6 11 macro pstamp.reset … … 65 70 66 71 task.exec 67 # echo pstamp_queue_requests.pl 68 command pstamp_queue_requests.pl 72 if ($DB:n == 0) 73 option DEFAULT 74 command pstamp_queue_requests.pl --limit 5 75 else 76 option $DB:$pstampDS_DB 77 command pstamp_queue_requests.pl --limit 5 --dbname $DB:$pstampDS_DB --verbose 78 $pstampDS_DB ++ 79 if ($pstampDS_DB >= $DB:n) set pstampDS_DB = 0 80 end 69 81 end 70 82 … … 91 103 92 104 task.exec 93 command pstamptool -pendingreq 94 end 95 96 task.exit $EXIT_SUCCESS 97 ipptool2book stdout pstampRequest -key req_id -uniq -setword pantaskState INIT 98 105 if ($DB:n == 0) 106 option DEFAULT 107 command pstamptool -pendingreq 108 else 109 option $DB:$pstampReq_DB 110 command pstamptool -pendingreq -dbname $DB:$pstampReq_DB 111 $pstampReq_DB ++ 112 if ($pstampReq_DB >= $DB:n) set pstampReq_DB = 0 113 end 114 end 115 116 task.exit $EXIT_SUCCESS 117 ipptool2book stdout pstampRequest -key req_id -uniq -setword dbname $options:0 -setword pantaskState INIT 99 118 if ($VERBOSE > 2) 100 119 echo starting request … … 129 148 book setword pstampRequest $pageName pantaskState RUN 130 149 book getword pstampRequest $pageName req_id -var REQ_ID 131 132 $run = pstamp_parser_run.pl $REQ_ID 133 150 book getword pstampRequest $pageName dbname -var DBNAME 151 152 $run = pstamp_parser_run.pl --req_id $REQ_ID 153 154 add_standard_args run 134 155 options $pageName 135 156 … … 142 163 143 164 task.exit default 144 echo pstamp.request.run task.exit status: $JOB_STATUS165 # echo pstamp.request.run task.exit status: $JOB_STATUS 145 166 process_exit pstampRequest $options:0 $JOB_STATUS 146 167 end … … 161 182 162 183 task.exec 163 $run = pstampfinish 164 command $run 165 end 166 184 if ($DB:n == 0) 185 option DEFAULT 186 command pstampfinish 187 else 188 option $DB:$pstampFin_DB 189 command pstampfinish -dbname $DB:$pstampFin_DB 190 $pstampFin_DB ++ 191 if ($pstampFin_DB >= $DB:n) set pstampFin_DB = 0 192 end 193 end 194 195 task.exit $EXIT_SUCCESS 196 # nothing to do 197 end 167 198 task.exit default 168 # nothing to do199 showcommand failure 169 200 end 170 201 … … 185 216 if ($DB:n == 0) 186 217 option DEFAULT 187 #echo command pstamptool -pendingjob -limit 10188 218 command pstamptool -pendingjob -limit 10 189 219 else … … 191 221 command pstamptool -pendingjob -limit 10 -dbname $DB:$pstampJob_DB 192 222 $pstampJob_DB ++ 193 if ($pstampJob_DB >= $DB:n) set regPendingImfile_DB = 0223 if ($pstampJob_DB >= $DB:n) set pstampJob_DB = 0 194 224 end 195 225 end … … 197 227 task.exit $EXIT_SUCCESS 198 228 # echo ipptool2book stdout pstampJob -key job_id -setword dbname $options:0 -setword pantaskState INIT 199 #ipptool2book stdout pstampJob -key job_id-setword dbname $options:0 -setword pantaskState INIT200 ipptool2book stdout pstampJob -key job_id -uniq -setword pantaskState INIT 201 229 ipptool2book stdout pstampJob -key job_id -uniq -setword dbname $options:0 -setword pantaskState INIT 230 231 book npages pstampJob -var N 202 232 if ($VERBOSE > 2) 203 # echo book listbook pstampJob":"204 echo starting job:205 233 book listbook pstampJob 206 234 end 207 235 236 # delete existing entries in the appropriate pantaskStates 208 237 process_cleanup pstampJob 209 238 end … … 235 264 book setword pstampJob $pageName pantaskState RUN 236 265 book getword pstampJob $pageName job_id -var JOB_ID 237 238 book listpage pstampJob $pageName 239 240 $run = pstamp_job_run.pl $JOB_ID 241 242 # ppstamp_run udpates the state of the job now 243 #$run = pstamptool -processedjob -state stop -status 0 -job_id $JOB_ID 266 book getword pstampJob $pageName dbname -var DBNAME 267 268 if ($VERBOSE > 1) 269 book listpage pstampJob $pageName 270 end 271 272 273 $run = pstamp_job_run.pl --job_id $JOB_ID 274 add_standard_args run 244 275 245 276 options $pageName
Note:
See TracChangeset
for help on using the changeset viewer.
