projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d6a738
)
onStat publishes a "complete" event when the number of active clients
author
Mike Taylor
<mike@indexdata.com>
Tue, 8 Apr 2014 16:08:57 +0000
(17:08 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Tue, 8 Apr 2014 16:08:57 +0000
(17:08 +0100)
falls to zero. This enables us to make a "search is complete" widget,
which fixes bugs MKWS-48 and MKWS-49.
src/mkws-team.js
patch
|
blob
|
history
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
ee18f1b
..
4447457
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-115,8
+115,9
@@
function team($, teamName) {
}
function onStat(data) {
}
function onStat(data) {
- log("stat");
queue("stat").publish(data);
queue("stat").publish(data);
+ if (parseInt(data.activeclients[0], 10) === 0)
+ queue("complete").publish(parseInt(data.hits[0], 10));
}
function onTerm(data) {
}
function onTerm(data) {