do not quote Pg after all

This commit is contained in:
Oliver Gorwits
2014-06-11 22:26:49 +01:00
parent c10095939b
commit 8e0be7d489
5 changed files with 7 additions and 6 deletions

View File

@@ -22,7 +22,6 @@ if (ref {} eq ref setting('database')) {
options => {
AutoCommit => 1,
RaiseError => 1,
quote_names => 1,
auto_savepoint => 1,
pg_enable_utf8 => 1,
},

View File

@@ -10,7 +10,7 @@ Module::Load::load_remote 'JobQueue' => 'App::Netdisco::JobQueue' => ':all';
sub jq_getsome { shift and JobQueue::jq_getsome(@_) }
sub jq_locked { shift and JobQueue::jq_locked(@_) }
sub jq_queued { shift and JobQueue::jq_queued(@_) }
sub jq_take { goto \&JobQueue::jq_take }
sub jq_take { shift and JobQueue::jq_take(@_) }
sub jq_lock { shift and JobQueue::jq_lock(@_) }
sub jq_defer { shift and JobQueue::jq_defer(@_) }
sub jq_complete { shift and JobQueue::jq_complete(@_) }

View File

@@ -5,6 +5,7 @@ use Dancer::Plugin::DBIC 'schema';
use Net::Domain 'hostfqdn';
use Try::Tiny;
use MCE ();
use base 'Exporter';
our @EXPORT = ();
@@ -103,14 +104,14 @@ sub jq_userlog {
# the main daemon process. This is only used by daemon workers which can use
# MCE ->do() method.
sub jq_take {
my ($self, $wid, $type) = @_;
my ($wid, $type) = @_;
# be polite to SQLite database (that is, local CPU)
debug "$type ($wid): sleeping now...";
sleep(1);
debug "$type ($wid): asking for a job";
$self->do('take_jobs', $wid, $type);
MCE->do('take_jobs', $wid, $type);
}
sub jq_lock {