mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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)
|
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']
|
, names = ['followers', 'following', 'repos', 'watched']
|
||||||
if (!t || +new Date() - t > 86400000) {
|
if (!t || +new Date() - t > 86400000) {
|
||||||
console.log('stale ' + String(t))
|
console.log('stale ' + String(t))
|
||||||
ObjectStore.set('t-proj', +new Date())
|
data.set('t-proj', +new Date())
|
||||||
names.forEach(function(name) {
|
names.forEach(function(name) {
|
||||||
GITR[name]('samsonjs', function(err, things) {
|
GITR[name]('samsonjs', function(err, things) {
|
||||||
if (err) {
|
if (err) {
|
||||||
text('n' + name, '?')
|
text('n' + name, '?')
|
||||||
} else {
|
} else {
|
||||||
ObjectStore.set(name, things)
|
data.set(name, things)
|
||||||
updateN(name, things)
|
updateN(name, things)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -78,7 +79,7 @@
|
||||||
} else {
|
} else {
|
||||||
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
|
console.log('hit ' + t + ' (' + (+new Date() - t) + ')')
|
||||||
names.forEach(function(name) {
|
names.forEach(function(name) {
|
||||||
updateN(name, ObjectStore.get(name))
|
updateN(name, data.get(name))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue