| 14 | | life in state 'new'. |
| 15 | | |
| 16 | | Request files are parsed into jobs by the task pstamp.job.run |
| | 14 | life in state 'new'. Once it is done parsing the state is set to 'run'. Request files are parsed into jobs by the task pstamp.job.run. The working directory for a request is /data/ippdb02.0/pstamp/work/$datestr/$req_id. |
| | 15 | |
| | 16 | For example here is the entry for a request while it is being parsed |
| | 17 | |
| | 18 | {{{ |
| | 19 | |
| | 20 | |
| | 21 | mysql> select * from pstampRequest where req_id = 5977; |
| | 22 | +--------+-------+-------+------------------+---------+--------+---------------+---------------------------------------------------------+-------------------------------------------+-------+ |
| | 23 | | req_id | ds_id | state | name | reqType | label | outProduct | uri | outdir | fault | |
| | 24 | +--------+-------+-------+------------------+---------+--------+---------------+---------------------------------------------------------+-------------------------------------------+-------+ |
| | 25 | | 5977 | 0 | new | Niall.1274580688 | pstamp | WEB.UP | pstampresults | /data/ippdb02.0/pstamp/work/20100527/5977/web_1695.fits | /data/ippdb02.0/pstamp/work/20100527/5977 | 0 | |
| | 26 | +--------+-------+-------+------------------+---------+--------+---------------+---------------------------------------------------------+-------------------------------------------+-------+ |
| | 27 | 1 row in set (0.00 sec) |
| | 28 | |
| | 29 | |
| | 30 | }}} |
| 31 | | update processing for the dependent component. CAREFUL THERE BE SPIDERS |
| | 45 | update processing for the dependent component. CAREFUL. THERE BE SPIDERS! |
| | 46 | |
| | 47 | The log file for the dependent is stored in the file named "$pstampDependent->{outdir}/checkdep.$dep_id.log". |
| | 48 | The script runs periodically, the log file is appended to each time. The outdir for the dependent is |
| | 49 | the outdir of the first request that needs the component. |
| | 50 | |
| | 51 | Dependents can start being processed before parsing completes. The -pendingdependent query is |
| | 52 | |
| | 53 | |
| | 54 | {{{ |
| | 55 | SELECT DISTINCT |
| | 56 | pstampDependent.*, |
| | 57 | IFNULL(Label.priority, 10000) AS priority |
| | 58 | FROM pstampDependent |
| | 59 | JOIN pstampJob USING(dep_id) |
| | 60 | JOIN pstampRequest USING(req_id) |
| | 61 | LEFT JOIN Label ON pstampRequest.label = Label.label |
| | 62 | WHERE pstampDependent.state = 'new' |
| | 63 | AND pstampDependent.fault = 0 |
| | 64 | AND pstampJob.state = 'run' |
| | 65 | AND (pstampRequest.state = 'run' OR pstampRequest.state = 'new') |
| | 66 | AND (Label.active OR Label.active IS NULL) |
| | 67 | ORDER BY priority DESC, req_id LIMIT 1 |
| | 68 | |
| | 69 | }}} |
| | 70 | |
| 121 | | The update processing is managed by the 'update' pantasks |
| 122 | | |
| 123 | | |
| 124 | | |
| 125 | | |
| 126 | | |
| 127 | | |
| | 158 | The update processing is managed by the 'update' pantasks. |
| | 159 | |
| | 160 | When a dependent run faults (that is when a |
| | 161 | update of a chipProcessedImfile, warpSkyfile, etc faults) the dependent is faulted as well. Thus to revert |
| | 162 | the dependent one needs to revert the underlying failure first and then revert the dependent. This is not |
| | 163 | yet done automatically. |
| | 164 | |
| | 165 | For example say the dependent listed above fails due to an nfs error. The chipProcessedImfile.fault should be |
| | 166 | set to a PS_EXIT_SYS_ERROR (2). pstamp_checkdependent.pl will notice this and fault the dependent. It does this |
| | 167 | to avoid faulted dependents from filling up the pantasks queue thus preventing other dependents from running. |
| | 168 | |
| | 169 | Once the chip fault has been cleared |
| | 170 | |
| | 171 | |
| | 172 | |
| | 173 | |
| | 174 | == Postage Stamp Error Codes == |
| | 175 | |
| | 176 | |
| | 177 | {{{ |
| | 178 | |
| | 179 | typedef enum { |
| | 180 | PSTAMP_SUCCESS = 0, |
| | 181 | PSTAMP_FIRST_ERROR_CODE = 10, |
| | 182 | PSTAMP_SYSTEM_ERROR = 10, |
| | 183 | PSTAMP_NOT_IMPLEMENTED = 11, |
| | 184 | PSTAMP_UNKNOWN_ERROR = 12, |
| | 185 | PSTAMP_DUP_REQUEST = 20, |
| | 186 | PSTAMP_INVALID_REQUEST = 21, |
| | 187 | PSTAMP_UNKNOWN_PRODUCT = 22, |
| | 188 | PSTAMP_NO_IMAGE_MATCH = 23, |
| | 189 | PSTAMP_NOT_DESTREAKED = 24, |
| | 190 | PSTAMP_NOT_AVAILABLE = 25, |
| | 191 | PSTAMP_GONE = 26, |
| | 192 | PSTAMP_NO_JOBS_QUEUED = 27, |
| | 193 | PSTAMP_NO_OVERLAP = 28 |
| | 194 | } pstampJobErrors; |
| | 195 | }}} |
| | 196 | |
| | 197 | |
| | 198 | |
| | 199 | |
| | 200 | |
| | 201 | |
| | 202 | |
| | 203 | |