From a5ad557b06b030704732bd68930386b2e925725b Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 22 Jun 2014 21:26:34 +0100 Subject: [PATCH] bugfix with plackup restarter: MCE should not be loaded in web app - make it runtime --- Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm index ca1c4ced..ffd89ef7 100644 --- a/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/Netdisco/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -4,8 +4,8 @@ use Dancer qw/:moose :syntax :script/; use Dancer::Plugin::DBIC 'schema'; use Net::Domain 'hostfqdn'; +use Module::Load (); use Try::Tiny; -use MCE (); use base 'Exporter'; our @EXPORT = (); @@ -105,6 +105,7 @@ sub jq_userlog { # MCE ->do() method. sub jq_take { my ($wid, $type) = @_; + Module::Load::load 'MCE'; # be polite to SQLite database (that is, local CPU) debug "$type ($wid): sleeping now...";