Commit dd2183902a12607b5580e67c3ab98ff7201168b6
add sbot.progress
Dominic Tarr committed on 6/9/2017, 7:52:21 AMParent: 2f501bf86e1c1557fd626c587a72026ed330fd65
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -76,42 +76,19 @@ | ||
76 | 76 | } |
77 | 77 | |
78 | 78 | //remove this, but we'll need something to make a progress bar |
79 | 79 | //otherwise people will get confused about what is happening. |
80 | - /* | |
81 | - var _views, _prev | |
82 | 80 | |
83 | - var state = since() | |
84 | - var int = setInterval(function (){ | |
85 | - var _state = since() | |
86 | - if(_state.since == undefined) return | |
87 | - if(state && !state.sync && !_state.sync && state.since == _state.since) { | |
88 | - var c = 0, t = 0 | |
81 | + | |
89 | 82 | |
90 | - for(var k in _state.plugins) { | |
91 | - c += state.plugins[k] | |
92 | - t++ | |
93 | - } | |
94 | - | |
95 | - if(c/t !== _views || c/t != _state.since) { | |
96 | - console.log('Rebuilding Indexes:', c/t, _views, (c/t)/_state.since) | |
97 | - } | |
98 | - } | |
99 | - else if(_state.since != _prev) | |
100 | - console.log("indexes synchronised:", _state.since) | |
101 | - | |
102 | - state = _state | |
103 | - _prev = state.since | |
104 | - }, 1000) | |
105 | - | |
106 | - //unref is a node.js only api. | |
107 | - if (int.unref) int.unref() | |
108 | - */ | |
109 | - | |
110 | 83 | return { |
111 | 84 | id : feed.id, |
112 | 85 | keys : opts.keys, |
113 | 86 | |
87 | + progress : function () { | |
88 | + return ssb.progress | |
89 | + }, | |
90 | + | |
114 | 91 | //temporary! |
115 | 92 | _flumeUse : |
116 | 93 | function (name, flumeview) { |
117 | 94 | ssb.use(name, flumeview) |
@@ -182,4 +159,5 @@ | ||
182 | 159 | }) |
183 | 160 | .use(SSB) |
184 | 161 | |
185 | 162 | |
163 | + |
Built with git-ssb-web