Changeset 21410 for trunk/pstamp/scripts/pstamp_queue_requests.pl
- Timestamp:
- Feb 6, 2009, 5:44:55 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_queue_requests.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_queue_requests.pl
r19265 r21410 107 107 my $command = "$dsproductls --uri $ds->{uri}/index.txt"; 108 108 $command .= " --last_fileset $ds->{lastFileset}" if $ds->{lastFileset}; 109 109 110 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 110 111 run(command => $command, verbose => $verbose); 111 112 unless ($success) { 113 # dsproductls exit status is the http error code - 300 114 my $exit_status = $error_code >> 8; 115 116 # don't die on "common faults" 117 # perhaps after some number of these we should mark the data store as disabled 118 next if ($exit_status == 200); # 500 cannot connect (data store down) 119 next if ($exit_status == 104); # 404 not found 120 # next if ($exit_status == 100); # 400 bad request 121 112 122 die("Unable to perform $command: $error_code"); 113 123 } … … 143 153 run(command => $command, verbose => $verbose); 144 154 unless ($success) { 155 # we don't want to die here. We need to set lastFileset 156 # so that we don't re queue requsts that we have proccessed 145 157 die("Unable to perform $command: $error_code"); 146 158 } … … 175 187 } 176 188 $lastFileset = $fs_name; 177 last if ($numFilesets >= $limit); 178 } 179 180 ## now update the last_fileset column in pstampDataStore 181 ## XXX: we should perhaps do this while processing each fileset so that if a later 182 ## one has an error we don't get repeats. 183 184 if ($lastFileset) { 185 # print "last fileset: $lastFileset\n"; 189 186 190 { 191 ## now update the last_fileset column in pstampDataStore 187 192 my $command = "$pstamptool -ds_id $ds_id -moddatastore -last_fileset $lastFileset"; 188 193 $command .= " -dbname $dbname" if $dbname; … … 193 198 } 194 199 } 200 last if ($numFilesets >= $limit); 195 201 } 196 202 }
Note:
See TracChangeset
for help on using the changeset viewer.
