Implement global advisory lock

This commit is contained in:
Juerd Waalboer 2022-08-29 17:50:12 +02:00
parent 9db2b208eb
commit 22ca2ec61e
14 changed files with 288 additions and 92 deletions

View file

@ -6,7 +6,6 @@
use Time::HiRes qw(sleep);
sub _read_warnings() {
open my $fh, 'revbank.warnings' or die $!;
return map {
my ($regex, $products, $text) = m[^
(?:
@ -26,7 +25,7 @@ sub _read_warnings() {
my ($id, $desc) = @_;
(grep { $_ eq $id } split /,/, $products) ? $text : ();
}
} grep /\S/, grep !/^\s*#/, readline $fh;
} grep /\S/, grep !/^\s*#/, slurp 'revbank.warnings';
}
sub hook_add_entry($class, $cart, $entry, @) {