mirror of
https://github.com/status-im/status-github-bot.git
synced 2025-02-28 12:50:33 +00:00
Refresh GitHub<->Slack user mapping every 24 hours
This commit is contained in:
parent
44662eeed2
commit
ffca465ccc
@ -20,6 +20,9 @@ class GitHubSlackIdMapper {
|
|||||||
this.robot = robot
|
this.robot = robot
|
||||||
this.cache = new MemCache({ timeoutDisabled: true })
|
this.cache = new MemCache({ timeoutDisabled: true })
|
||||||
this.buildPromise = new Promise((resolve, reject) => internalBuild(this.robot, this.cache).then(resolve).catch(reject))
|
this.buildPromise = new Promise((resolve, reject) => internalBuild(this.robot, this.cache).then(resolve).catch(reject))
|
||||||
|
|
||||||
|
// Refresh cache every day
|
||||||
|
setTimeout(() => internalBuild(this.robot, this.cache), 24 * 60 * 60 * 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getGitHubIdFromSlackId (slackUserId, cache) {
|
async getGitHubIdFromSlackId (slackUserId, cache) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user