git ssb

4+

Dominic / scuttlebot



Commit dd2183902a12607b5580e67c3ab98ff7201168b6

add sbot.progress

Dominic Tarr committed on 6/9/2017, 7:52:21 AM
Parent: 2f501bf86e1c1557fd626c587a72026ed330fd65

Files changed

index.jschanged
index.jsView
@@ -76,42 +76,19 @@
7676 }
7777
7878 //remove this, but we'll need something to make a progress bar
7979 //otherwise people will get confused about what is happening.
80- /*
81- var _views, _prev
8280
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+
8982
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-
11083 return {
11184 id : feed.id,
11285 keys : opts.keys,
11386
87+ progress : function () {
88+ return ssb.progress
89+ },
90+
11491 //temporary!
11592 _flumeUse :
11693 function (name, flumeview) {
11794 ssb.use(name, flumeview)
@@ -182,4 +159,5 @@
182159 })
183160 .use(SSB)
184161
185162
163+

Built with git-ssb-web