Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improve log messages for db generation/app restart (Closes #28)
  • Loading branch information
zoffixznet committed Nov 21, 2015
1 parent 1d97568 commit f41ff22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion web/build-project-list.pl
Expand Up @@ -66,5 +66,4 @@
}

$p6p->restart_app;
say '[' . localtime . '] database generated; app restarted';

5 changes: 5 additions & 0 deletions web/lib-db-builder/P6Project.pm
Expand Up @@ -158,6 +158,7 @@ sub write_json {
sub write_dist_db {
my $self = shift;

say '[' . localtime . '] starting database generation';
{ # let model go out of scope, so the db file gets finished off
unlink DB_FILE_TEMP;
my $m = ModulesPerl6::Model::Dists->new( db_file => DB_FILE_TEMP );
Expand Down Expand Up @@ -192,13 +193,17 @@ sub write_dist_db {
);

move DB_FILE_TEMP, catfile $self->output_dir, DB_FILE;

say '[' . localtime . '] database generation completed';

$self;
}

sub restart_app {
my $self = shift;
return $self if $self->no_app_start;

say '[' . localtime . '] Restarting app';
system hypnotoad => catfile $self->output_dir, qw/bin ModulesPerl6.pl/;

$self;
Expand Down

0 comments on commit f41ff22

Please sign in to comment.