https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18725

Marcel de Rooy <m.de.r...@rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #5 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> ---
+    my $lock_sth = $dbh->prepare('LOCK TABLES message_queue WRITE');
+    my $attempts = 0;
+    until ( $sth->execute() ) {
+        $attempts++;
+        die 'Unable to lock message_queue to update message status: ' .
$dbh->errstr() if $attempts > 10;
+        sleep 1;
+    }
+
     my $result = $sth->execute( $params->{'status'},
                                 $params->{'message_id'} );

Hey, you are executing on $sth while you probably meant $lock_sth. You only
prepare the lock, and start fake updating with two undefs.

Overall, this seems not a good idea to me. We had problems with locking tables
already and you should not lock when we run Letters.t since the lock does a
commit. Note that we had a test for prove and an env variable
KOHA_NO_TABLE_LOCKS.

If the disk is full, a lot of other jobs must fail too btw. Doesnt the job
crash on trying the update btw, or did it only send the same one mail each
time? If you cant write to disk, perhaps you could try to save this error
condition to the cache in memory ??
Note that processing mail will probably soon fail too without much disk space..

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to