diff --git a/Netdisco/Changes b/Netdisco/Changes index cc7580da..3fb4a258 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -11,7 +11,7 @@ * Fix for device counts in VLAN Inventory report * Forward port housekeeping/schedule and expiry/expire legacy config * Store started timestamp on job completion - * Set UTF-8 mode and DBIC quoting on Pg database connection + * Set UTF-8 mode on Pg database connection 2.027007 - 2014-05-27 diff --git a/Netdisco/META.yml b/Netdisco/META.yml index 9a6d5e7d..be6f2707 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -26,9 +26,10 @@ requires: App::cpanminus: 1.6108 App::local::lib::helper: 0.07 Archive::Extract: 0 + CGI::Expand: 2.05 DBD::Pg: 0 DBD::SQLite: 1.37 - DBIx::Class: 0.0821 + DBIx::Class: 0.0825 DBIx::Class::Helpers: 2.018004 Daemon::Control: 0.001 Dancer: 1.3112 diff --git a/Netdisco/lib/App/Netdisco/Configuration.pm b/Netdisco/lib/App/Netdisco/Configuration.pm index ff2f13ec..d6db6a89 100644 --- a/Netdisco/lib/App/Netdisco/Configuration.pm +++ b/Netdisco/lib/App/Netdisco/Configuration.pm @@ -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, }, diff --git a/Netdisco/lib/App/Netdisco/Daemon/JobQueue.pm b/Netdisco/lib/App/Netdisco/Daemon/JobQueue.pm index 097582d5..abbe62dc 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/JobQueue.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/JobQueue.pm @@ -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(@_) } diff --git a/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm index 545eb451..ca1c4ced 100644 --- a/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -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 {