We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b598a0 commit 232c298Copy full SHA for 232c298
bin/sparky-web.raku
@@ -42,6 +42,7 @@ sub create-cro-app ($pool) {
42
whenever $incoming -> $message {
43
my $done = False;
44
my @chunk;
45
+ my $i = 0;
46
while True {
47
my @data = "$reports-dir/$project/build-$build_id.txt".IO.lines;
48
for @data[$last_e .. *] -> $l {
@@ -52,7 +53,8 @@ sub create-cro-app ($pool) {
52
53
@chunk.push($msg);
54
#emit($msg);
55
}
- if @chunk.elems >= 1000 {
56
+ $i++; sleep(1);
57
+ if @chunk.elems and (@chunk.elems >= 1000 or $i <= 10) {
58
say("ws: send data to client: {@chunk.elems} lines");
59
emit(@chunk.join("\n"));
60
@chunk = ();
0 commit comments