bugfix with plackup restarter: MCE should not be loaded in web app - make it runtime

This commit is contained in:
Oliver Gorwits
2014-06-22 21:26:34 +01:00
parent 2eb3343de8
commit a5ad557b06

View File

@@ -4,8 +4,8 @@ use Dancer qw/:moose :syntax :script/;
use Dancer::Plugin::DBIC 'schema'; use Dancer::Plugin::DBIC 'schema';
use Net::Domain 'hostfqdn'; use Net::Domain 'hostfqdn';
use Module::Load ();
use Try::Tiny; use Try::Tiny;
use MCE ();
use base 'Exporter'; use base 'Exporter';
our @EXPORT = (); our @EXPORT = ();
@@ -105,6 +105,7 @@ sub jq_userlog {
# MCE ->do() method. # MCE ->do() method.
sub jq_take { sub jq_take {
my ($wid, $type) = @_; my ($wid, $type) = @_;
Module::Load::load 'MCE';
# be polite to SQLite database (that is, local CPU) # be polite to SQLite database (that is, local CPU)
debug "$type ($wid): sleeping now..."; debug "$type ($wid): sleeping now...";