mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
don't use default object store on projects page
This commit is contained in:
parent
b01096280d
commit
2fcf0f543d
1 changed files with 5 additions and 4 deletions
|
|
@ -60,17 +60,18 @@
|
|||
textHighlight('n' + name, things.length)
|
||||
}
|
||||
|
||||
var t = ObjectStore.get('t-proj')
|
||||
var data = createObjectStore('proj')
|
||||
, t = data.get('t-proj')
|
||||
, names = ['followers', 'following', 'repos', 'watched']
|
||||
if (!t || +new Date() - t > 86400000) {
|
||||
console.log('stale ' + String(t))
|
||||
ObjectStore.set('t-proj', +new Date())
|
||||
data.set('t-proj', +new Date())
|
||||
names.forEach(function(name) {
|
||||
GITR[name]('samsonjs', function(err, things) {
|
||||
if (err) {
|
||||
text('n' + name, '?')
|
||||
} else {
|
||||
ObjectStore.set(name, things)
|
||||
data.set(name, things)
|
||||
updateN(name, things)
|
||||
}
|
||||
})
|
||||
|
|
@ -78,7 +79,7 @@
|
|||
} else {
|
||||
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
|
||||
names.forEach(function(name) {
|
||||
updateN(name, ObjectStore.get(name))
|
||||
updateN(name, data.get(name))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue