Skip to content

Commit

Permalink
Stop Buildable from pretending to work when asked
Browse files Browse the repository at this point in the history
The idea is that if any other mechanism breaks (e.g. webhooks are down),
then you should be able to “wake” it up by just asking for the status.
However, in this case the functionality was a bit too eager, which
resulted in the bot always saying “Building” even when it was idle.
  • Loading branch information
AlexDaniel committed Nov 5, 2023
1 parent dd2990d commit a6d775d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xbin/Buildable.p6
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ sub get-projects() {
}

multi method irc-to-me($msg where /:i [status|info|builds|stats?]/) {
$trigger-supplier.emit(True);

my $projects = get-projects.map({
my $total-size = 0;
my $files = 0;
Expand All @@ -68,6 +66,9 @@ multi method irc-to-me($msg where /:i [status|info|builds|stats?]/) {
}
}
$activity ||= (😴 Idle) ;

$trigger-supplier.emit(True); # trigger based on IRC message, just in case

$activity ~ $projects
}

Expand Down

0 comments on commit a6d775d

Please sign in to comment.