From 55e61ae897ee944a61d1a822170027cd376cec2a Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 22 Jan 2015 23:41:16 +0200 Subject: [PATCH] Do not load Gruntmaster::Data if not needed --- lib/Gruntmaster/Daemon.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 681a141..a84fc57 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -8,7 +8,6 @@ our $VERSION = '5999.000_004'; use Gruntmaster::Daemon::Constants qw/ERR/; use Gruntmaster::Daemon::Format qw/prepare_files/; -use Gruntmaster::Data; use File::Basename qw/fileparse/; use File::Temp qw/tempdir/; @@ -34,6 +33,8 @@ use constant FORMAT_EXTENSION => { ################################################## +sub purge; + my $db; sub safe_can_nodie { @@ -168,6 +169,7 @@ sub got_job{ } sub run{ + require Gruntmaster::Data; $db = Gruntmaster::Data->connect('dbi:Pg:'); Log::Log4perl->init('/etc/gruntmasterd/gruntmasterd-log.conf'); get_logger->info("gruntmasterd $VERSION started"); -- 2.39.2