mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-01-19 08:01:07 +00:00
Clean up
This commit is contained in:
parent
affa015258
commit
54e67d14f7
1 changed files with 2 additions and 14 deletions
|
@ -18,21 +18,9 @@ function Gather (options) {
|
|||
if (!(this instanceof Gather)) {
|
||||
return new Gather(options);
|
||||
}
|
||||
|
||||
let noop = () => {};
|
||||
|
||||
if (options && typeof options.onEvent === 'function') {
|
||||
this.onEvent = options.onEvent;
|
||||
} else {
|
||||
this.onEvent = noop;
|
||||
}
|
||||
|
||||
if (options && typeof options.onDone === 'function') {
|
||||
this.onDone = options.onDone;
|
||||
} else {
|
||||
this.onDone = noop;
|
||||
}
|
||||
|
||||
this.onDone = (options && typeof options.onDone === 'function') ? options.onDone : noop;
|
||||
this.onEvent = (options && typeof options.onEvent === 'function') ? options.onEvent : noop;
|
||||
this.TEAM_SIZE = 6;
|
||||
this.gatherers = [];
|
||||
this.ELECTION_INTERVAL = 300000; // 5 mins
|
||||
|
|
Loading…
Reference in a new issue