Make logging of locks more descriptive

This commit is contained in:
Garrett Mills 2021-04-10 16:18:33 -05:00
parent d07feccd14
commit 78287fcc2a
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -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)
}) })