default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / FS / bin / freeside-eftca-download
index caf9e0e..56d82c7 100755 (executable)
@@ -57,7 +57,10 @@ my $conf = new FS::Conf;
 
 my @agents;
 if ( $conf->exists('batch-spoolagent') ) {
-  @agents = qsearch('agent', { 'disabled' => '' });
+  local $@;
+  eval { @agents = qsearch('agent', { 'disabled' => '' }); };
+  log_error_and_die("Fatal database error: $@")
+    if $@;
 } else {
   @agents = (1);
 }