Skip to content

Commit

Permalink
release 0.46.4
Browse files Browse the repository at this point in the history
propper logging for async getters
  • Loading branch information
oetiker committed Jun 26, 2023
1 parent 8b7481c commit e8ba805
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
0.46.4 2023-06-26 14:19:27 +0200 Tobias Oetiker <[email protected]>

- propper logging for async getters

0.46.3 2023-06-14 18:30:45 +0200 Tobias Oetiker <[email protected]>

- fix base schema for yaml config files
- switch schema to draft2019
- do not reconfigure automatically if the secret file is missing

0.46.2 2023-06-12 15:00:43 +0200 Tobias Oetiker <[email protected]>

- fix restore process to properly reconnect to database
Expand Down
2 changes: 1 addition & 1 deletion lib/CallBackery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use CallBackery::Plugin::Doc;
use CallBackery::Database;
use CallBackery::User;

our $VERSION = '0.46.3';
our $VERSION = '0.46.4';


=head2 config
Expand Down
10 changes: 9 additions & 1 deletion lib/CallBackery/GuiPlugin/AbstractForm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,15 @@ sub getFieldValue {
if (ref $entry->{getter} eq 'CODE'){
my $start = time;
my $data = $entry->{getter}->($self);
$self->log->debug(sprintf("getter %s: %0.2fs",$field,time-$start));
if (eval { blessed $data && $data->isa('Mojo::Promise')}){
$data = $data->then(sub ($value) {
$self->log->debug(sprintf("async getter %s: %0.2fs",$field,time-$start));
return $value;
});
}
else {
$self->log->debug(sprintf("getter %s: %0.2fs",$field,time-$start));
}
return $data;
}
else {
Expand Down

0 comments on commit e8ba805

Please sign in to comment.