Skip to content

Commit

Permalink
Use real delays (oops!)
Browse files Browse the repository at this point in the history
That's a leftover from debugging. I think that's what was causing
Releasable to leak memory (reaching 1.5G at times). There's still no
good reason for leaking like that (even if it was doing something so
frequently), but we can count that as my fault.
  • Loading branch information
AlexDaniel committed Apr 10, 2018
1 parent 74db1cc commit bc77c2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/Releasable.p6
Expand Up @@ -249,7 +249,7 @@ sub remind($msg, @channels) {
multi method keep-reminding($msg) {
# TODO multi-server setup not supported (this will be irrelevant after #284)
loop {
my &bail = { sleep $CONFIG<releasable><spam-exception-delay>100000; next }
my &bail = { sleep $CONFIG<releasable><spam-exception-delay>; next }
my $datetime = parse-next-release $msg;
bail without $datetime;
my $diff = $datetime - DateTime.now;
Expand All @@ -258,7 +258,7 @@ multi method keep-reminding($msg) {
my $every = $CONFIG<releasable><spam-every>;
bail if $diff < $every; # too close to the release
my $left = $diff % $every;
sleep 15;#$left;
sleep $left;
remind $msg, $CONFIG<releasable><spammed-channels>
}
CATCH { default { self.handle-exception: $_, $msg } }
Expand Down

0 comments on commit bc77c2f

Please sign in to comment.