| 203 | | {{{loader.py}}} is the program that actually processes and publishes data to PSPS. You can run one or more instances of {{{loader.py}}} as the code has been designed so taht they will run concurrently without causing any problems. Note, however, that clients on machines where the DVO database is not on a local disk will run more slowly due to the increased burden of accessing DVO over the network. Also, {{{loader.py}}} will only run on a host with a scratch database setup. Instructions for this are [wiki:ippToPsps#Settingupaloadingmachine here]. '''Note''' that {{{loader.py}}} will look for an available scratch database that is not in use by anyone else, if none are found then it will quit. |
| 204 | | |
| 205 | | The first thing a {{{loader.py}}} instance does is look to the queue tables in the {{{ippToPsps}}} database for a list of items to process. It first attempt to secure a 'stripe' of RA (from the [wiki:ippToPsps_Database#Thestripetable stripe table]) that is not being processed by any other {{{loader.py}}} clients. If all available stripes have already been reserved, then it chooses the stripe with the largest number of pending items. |
| | 203 | {{{loader.py}}} is the program that actually processes and publishes data to PSPS. You can run one or more instances of {{{loader.py}}} as the code has been designed so that they will run concurrently without causing any problems. Note, however, that clients on machines where the DVO database is not on a local disk will run more slowly due to the increased burden of accessing DVO over the network. Also, {{{loader.py}}} will only run on a host with a scratch database setup. Instructions for this are [wiki:ippToPsps#Settingupaloadingmachine here]. '''Note''' that {{{loader.py}}} will look for an available scratch database that is not in use by anyone else, if none are found then it will quit. Example usage is: |
| | 204 | |
| | 205 | {{{ |
| | 206 | ./run.sh loader.py new3pi |
| | 207 | }}} |
| | 208 | |
| | 209 | The first thing a {{{loader.py}}} instance does is look to the queue tables in the {{{ippToPsps}}} database for a list of items to process. It first attempts to secure a 'stripe' of RA (from the [wiki:ippToPsps_Database#Thestripetable stripe table]) that is not being processed by any other {{{loader.py}}} clients. If all available stripes have already been reserved, then it chooses the stripe with the largest number of pending items. |