Subject: | Eval without checking $@ |
You are committing a BRADFITZ-ism by evaling SQL statements and not
checking for errors or $@ afterwards.
In insert, right after
for my $dbh ( $self->shuffled_databases ) {
eval {
$self->_try_insert($job,$dbh);
};
you should warn $@ if $@. Otherwise if there are database problems (like
permissions, incorrect schema search path, etc) they will be eaten up and
jobs won't go in. I spent way too much time debugging why my jobs weren't
being inserted.