mirror of
https://github.com/hackku21/loc-chain-backend.git
synced 2024-10-27 20:34:03 +00:00
Make logging of locks more descriptive
This commit is contained in:
parent
d07feccd14
commit
78287fcc2a
@ -58,12 +58,12 @@ export class FirebaseUnit extends Unit {
|
|||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logging.debug(`Unable to acquire lock: ${name}. Trying again soon...`)
|
this.logging.debug(`Unable to acquire lock: ${name} - ${description}. Trying again soon...`)
|
||||||
await this.sleep(500)
|
await this.sleep(500)
|
||||||
return this.trylock(name, description)
|
return this.trylock(name, description)
|
||||||
})
|
})
|
||||||
.catch(async reason => {
|
.catch(async reason => {
|
||||||
this.logging.debug(`Unable to acquire lock: ${name}. Trying again soon...`)
|
this.logging.debug(`Unable to acquire lock: ${name} - ${description}. Trying again soon...`)
|
||||||
await this.sleep(500)
|
await this.sleep(500)
|
||||||
return this.trylock(name, description)
|
return this.trylock(name, description)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user