Record a group's weight through weigh() alone
Mirror / push (push) Successful in 5s
Test / lint (pull_request) Successful in 22s
Test / test (18) (pull_request) Successful in 31s
Test / test (20) (pull_request) Successful in 31s
Test / test (22) (pull_request) Successful in 31s
Test / test (24) (pull_request) Successful in 31s
Test / test (26) (pull_request) Successful in 39s
Mirror / push (push) Successful in 5s
Test / lint (pull_request) Successful in 22s
Test / test (18) (pull_request) Successful in 31s
Test / test (20) (pull_request) Successful in 31s
Test / test (22) (pull_request) Successful in 31s
Test / test (24) (pull_request) Successful in 31s
Test / test (26) (pull_request) Successful in 39s
This commit is contained in:
@@ -54,10 +54,9 @@ export class ExpiringGroups<T> {
|
||||
}
|
||||
|
||||
/** Starts the group's deadline, and the sweeper if this is the only group held. */
|
||||
set(key: string, group: T, weight = 0): void {
|
||||
set(key: string, group: T): void {
|
||||
this.remove(key);
|
||||
this.entries.set(key, { deadline: this.now() + this.timeout, group, weight });
|
||||
this.total += weight;
|
||||
this.entries.set(key, { deadline: this.now() + this.timeout, group, weight: 0 });
|
||||
|
||||
if (this.sweeper) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user