Index: trunk/pstamp/scripts/pstamp_queue_requests.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_queue_requests.pl	(revision 27170)
+++ trunk/pstamp/scripts/pstamp_queue_requests.pl	(revision 27172)
@@ -83,5 +83,5 @@
 
     if (@$stdout_buf == 0) {
-        print STDERR "no data stores registered\n" if $verbose;
+        print STDERR "no data stores ready\n" if $verbose;
         exit 0;
     }
@@ -111,4 +111,6 @@
     my $outProduct = $ds->{outProduct};
     my $ds_id = $ds->{ds_id};
+    my $ds_label = $ds->{label};
+    $ds_label = undef if $ds_label eq "NULL";
     my @lines;
     {
@@ -124,7 +126,10 @@
             # don't die on "common faults"
             # perhaps after some number of these we should mark the data store as disabled
-            next if ($exit_status == 200);  # 500 cannot connect (data store down)
-            next if ($exit_status == 104);  # 404 not found
-#            next if ($exit_status == 100);  # 400 bad request
+            if (($exit_status == 200) or ($exit_status == 104)) {
+                ## now update the last_fileset column in pstampDataStore
+                update_ds_timestamp($ds_id, $dbname, $dbserver);
+                next;
+            }
+
 
             die("Unable to perform $command: $error_code");
@@ -133,4 +138,5 @@
         if (@$stdout_buf == 0) {
             print STDERR "no new request files in data store $ds_id\n" if $verbose;
+            update_ds_timestamp($ds_id, $dbname, $dbserver);
             next; # next data store
         }
@@ -184,4 +190,5 @@
             {
                 my $command = "$pstamptool -addreq -uri $req_uri -ds_id $ds_id";
+                $command .= " -label $ds_label" if $ds_label;
                 $command .= " -dbname $dbname" if $dbname;
                 $command .= " -dbserver $dbserver" if $dbserver;
@@ -199,5 +206,5 @@
         {
         ## now update the last_fileset column in pstampDataStore
-        my $command = "$pstamptool -ds_id $ds_id -moddatastore -last_fileset $lastFileset";
+        my $command = "$pstamptool -ds_id $ds_id -moddatastore -set_last_fileset $lastFileset";
         $command .= " -dbname $dbname" if $dbname;
         $command .= " -dbserver $dbserver" if $dbserver;
@@ -213,2 +220,17 @@
 
 exit 0;
+
+sub update_ds_timestamp {
+    my $ds_id = shift;
+    my $dbname = shift;
+    my $dbserver = shift;
+
+    my $command = "$pstamptool -ds_id $ds_id -moddatastore -update_timestamp";
+                $command .= " -dbname $dbname" if $dbname;
+                $command .= " -dbserver $dbserver" if $dbserver;
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        run(command => $command, verbose => $verbose);
+    unless ($success) {
+        die("Unable to perform pstamptool -moddatastore: $error_code");
+    }
+}
Index: trunk/pstamp/scripts/pstamp_webrequest.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_webrequest.pl	(revision 27170)
+++ trunk/pstamp/scripts/pstamp_webrequest.pl	(revision 27172)
@@ -125,4 +125,5 @@
 
     my $command = "$pstamptool -addreq -uri $request_file -ds_id 0";
+    $command .= " -label WEB";
     $command .= " -dbname $dbname" if $dbname;
     $command .= " -dbserver $dbserver" if $dbserver;
