From 36aaa1dbba3ce8f505bf883e4b7a54c7b1dbf49f Mon Sep 17 00:00:00 2001 From: Ignacio Coterillo Date: Thu, 8 Dec 2016 11:55:45 +0100 Subject: [PATCH] SCRIPTS: Add missing db_type replacement on Instance Factory call --- scripts/dbod-backup | 6 +++--- scripts/dbod-start | 6 +++--- scripts/dbod-stop | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/dbod-backup b/scripts/dbod-backup index fff44a6..b19f1c8 100755 --- a/scripts/dbod-backup +++ b/scripts/dbod-backup @@ -16,16 +16,16 @@ use Data::Dumper; my $job = DBOD::Job->new_with_options(); -use DBOD qw ($ERROR $OK); +use DBOD qw ($ERROR $OK $db_type); use DBOD::Instance; sub body { - $job->log->debug('Storting' . $job->entity() . '/' . + $job->log->debug('Performing backup on ' . $job->entity() . '/' . $job->metadata->{db_type}); my $instance = DBOD::Instance::Factory->create( - $job->metadata->{db_type}, + $db_type->{$job->metadata->{db_type}}, instance => $job->entity(), metadata => $job->metadata(), config => $job->config()); diff --git a/scripts/dbod-start b/scripts/dbod-start index fde73ac..fb159b2 100755 --- a/scripts/dbod-start +++ b/scripts/dbod-start @@ -16,16 +16,16 @@ use Data::Dumper; my $job = DBOD::Job->new_with_options(); -use DBOD qw ($ERROR $OK); +use DBOD qw ($ERROR $OK $db_type); use DBOD::Instance; sub body { - $job->log->debug('Storting' . $job->entity() . '/' . + $job->log->debug('Starting ' . $job->entity() . '/' . $job->metadata->{db_type}); my $instance = DBOD::Instance::Factory->create( - $job->metadata->{db_type}, + $db_type->{$job->metadata->{db_type}}, instance => $job->entity(), metadata => $job->metadata(), config => $job->config()); diff --git a/scripts/dbod-stop b/scripts/dbod-stop index b58af8b..7eaeee2 100755 --- a/scripts/dbod-stop +++ b/scripts/dbod-stop @@ -16,16 +16,16 @@ use Data::Dumper; my $job = DBOD::Job->new_with_options(); -use DBOD qw ($ERROR $OK); +use DBOD qw ($ERROR $OK $db_type); use DBOD::Instance; sub body { - $job->log->debug('Stopping' . $job->entity() . '/' . + $job->log->debug('Stopping ' . $job->entity() . '/' . $job->metadata->{db_type}); my $instance = DBOD::Instance::Factory->create( - $job->metadata->{db_type}, + $db_type->{$job->metadata->{db_type}}, instance => $job->entity(), metadata => $job->metadata(), config => $job->config());