An Event will be part of many Tasks
GQGQEMMADZ2T745QY2FIWLAWRVBSNH3RZABW42WPPYLYP3LQW7JQC
EKHD4I44MLSLT6TIEXGJR3BVRFPGOQQOU6J2M7DNDN5YC6EJRDEQC
our @ISA = qw(Exporter);our @EXPORT = qw( parse_payload);
our @ISA = qw(Exporter);
our @EXPORT = qw(
parse_payload
);
}sub new_event { my ($self, $channel_name, $payload) = @_; return bless { "channel_name" => $channel_name, "payload" => $payload, "event" => parse_payload($channel_name, $payload), }, $self;
}
sub new_event {
my ($self, $channel_name, $payload) = @_;
return bless {
"channel_name" => $channel_name,
"payload" => $payload,
"event" => parse_payload($channel_name, $payload),
}, $self;
subtest "Event: new event" => sub { my $event = Hydra::Event->new_event("build_started", "19"); is($event->{'payload'}, "19"); is($event->{'channel_name'}, "build_started"); is($event->{'event'}->{'build_id'}, 19);};
subtest "Event: new event" => sub {
my $event = Hydra::Event->new_event("build_started", "19");
is($event->{'payload'}, "19");
is($event->{'channel_name'}, "build_started");
is($event->{'event'}->{'build_id'}, 19);
};