チャートInsert時にロックをかけるように (#6100)

* chart lock

* fix
This commit is contained in:
MeiMei 2020-03-06 22:33:54 +09:00 committed by GitHub
parent 3e61aa0835
commit 20ac7e62e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 15 deletions

View file

@ -24,3 +24,7 @@ export function getApLock(uri: string, timeout = 30 * 1000) {
export function getNodeinfoLock(host: string, timeout = 30 * 1000) {
return lock(`nodeinfo:${host}`, timeout);
}
export function getChartInsertLock(lockKey: string, timeout = 30 * 1000) {
return lock(`chart-insert:${lockKey}`, timeout);
}