X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-queued;h=a3fb7e562a577ff35d942813fa7a132c0567618f;hb=3cf7afe4ff9bc62d1a5c0d78aae35193251dca25;hp=e14ddad8e7f946a5609010c2c270e9642880c268;hpb=b8cfd0780aa40bb07f3215bf9cb58011f5e32a35;p=freeside.git diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued index e14ddad8e..a3fb7e562 100644 --- a/FS/bin/freeside-queued +++ b/FS/bin/freeside-queued @@ -87,7 +87,7 @@ while (1) { unless ( dbh && dbh->ping ) { warn "WARNING: connection to database lost, reconnecting...\n"; - eval { myconnect; }; + eval { $FS::UID::dbh = myconnect; }; unless ( !$@ && dbh && dbh->ping ) { warn "WARNING: still no connection to database, sleeping for retry...\n"; @@ -162,6 +162,7 @@ while (1) { #} my @args = $ljob->args; + splice @args, 0, 1, $ljob if $args[0] eq '_JOB'; defined( my $pid = fork ) or do { warn "WARNING: can't fork: $!\n"; @@ -184,8 +185,12 @@ while (1) { forksuidsetup($user); - #auto-use export classes... - if ( $ljob->job =~ /(FS::part_export::\w+)::/ ) { + #auto-use classes... + #if ( $ljob->job =~ /(FS::part_export::\w+)::/ ) { + if ( $ljob->job =~ /(FS::part_export::\w+)::/ + || $ljob->job =~ /(FS::\w+)::/ + ) + { my $class = $1; eval "use $class;"; if ( $@ ) {