Tasks: only execute the event if the plugin is interested in it

This commit is contained in:
Graham Christensen
2021-12-20 13:27:59 -05:00
parent 633fc36d6a
commit a14501c616
12 changed files with 150 additions and 21 deletions

View File

@@ -27,6 +27,11 @@ sub new {
}, $self;
}
sub interestedIn {
my ($self, $plugin) = @_;
return int(defined($plugin->can('buildFinished')));
}
sub load {
my ($self, $db) = @_;

View File

@@ -25,6 +25,11 @@ sub new {
}, $self;
}
sub interestedIn {
my ($self, $plugin) = @_;
return int(defined($plugin->can('buildQueued')));
}
sub load {
my ($self, $db) = @_;

View File

@@ -25,6 +25,11 @@ sub new {
}, $self;
}
sub interestedIn {
my ($self, $plugin) = @_;
return int(defined($plugin->can('buildStarted')));
}
sub load {
my ($self, $db) = @_;

View File

@@ -34,6 +34,11 @@ sub new :prototype($$$) {
}, $self;
}
sub interestedIn {
my ($self, $plugin) = @_;
return int(defined($plugin->can('stepFinished')));
}
sub load {
my ($self, $db) = @_;