Changeset 27172 for trunk/pstamp/scripts/pstamp_queue_requests.pl
- Timestamp:
- Mar 3, 2010, 4:37:28 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_queue_requests.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_queue_requests.pl
r24831 r27172 83 83 84 84 if (@$stdout_buf == 0) { 85 print STDERR "no data stores re gistered\n" if $verbose;85 print STDERR "no data stores ready\n" if $verbose; 86 86 exit 0; 87 87 } … … 111 111 my $outProduct = $ds->{outProduct}; 112 112 my $ds_id = $ds->{ds_id}; 113 my $ds_label = $ds->{label}; 114 $ds_label = undef if $ds_label eq "NULL"; 113 115 my @lines; 114 116 { … … 124 126 # don't die on "common faults" 125 127 # perhaps after some number of these we should mark the data store as disabled 126 next if ($exit_status == 200); # 500 cannot connect (data store down) 127 next if ($exit_status == 104); # 404 not found 128 # next if ($exit_status == 100); # 400 bad request 128 if (($exit_status == 200) or ($exit_status == 104)) { 129 ## now update the last_fileset column in pstampDataStore 130 update_ds_timestamp($ds_id, $dbname, $dbserver); 131 next; 132 } 133 129 134 130 135 die("Unable to perform $command: $error_code"); … … 133 138 if (@$stdout_buf == 0) { 134 139 print STDERR "no new request files in data store $ds_id\n" if $verbose; 140 update_ds_timestamp($ds_id, $dbname, $dbserver); 135 141 next; # next data store 136 142 } … … 184 190 { 185 191 my $command = "$pstamptool -addreq -uri $req_uri -ds_id $ds_id"; 192 $command .= " -label $ds_label" if $ds_label; 186 193 $command .= " -dbname $dbname" if $dbname; 187 194 $command .= " -dbserver $dbserver" if $dbserver; … … 199 206 { 200 207 ## now update the last_fileset column in pstampDataStore 201 my $command = "$pstamptool -ds_id $ds_id -moddatastore - last_fileset $lastFileset";208 my $command = "$pstamptool -ds_id $ds_id -moddatastore -set_last_fileset $lastFileset"; 202 209 $command .= " -dbname $dbname" if $dbname; 203 210 $command .= " -dbserver $dbserver" if $dbserver; … … 213 220 214 221 exit 0; 222 223 sub update_ds_timestamp { 224 my $ds_id = shift; 225 my $dbname = shift; 226 my $dbserver = shift; 227 228 my $command = "$pstamptool -ds_id $ds_id -moddatastore -update_timestamp"; 229 $command .= " -dbname $dbname" if $dbname; 230 $command .= " -dbserver $dbserver" if $dbserver; 231 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 232 run(command => $command, verbose => $verbose); 233 unless ($success) { 234 die("Unable to perform pstamptool -moddatastore: $error_code"); 235 } 236 }
Note:
See TracChangeset
for help on using the changeset viewer.
