Feat: make lamassu-migrate use async local storage

This commit is contained in:
csrapr 2021-03-02 17:33:47 +00:00 committed by Josh Harvey
parent 351d170c31
commit 7bbf2829de
5 changed files with 26 additions and 26 deletions

View file

@ -1,11 +1,10 @@
const { AsyncLocalStorage } = require('async_hooks')
const asyncLocalStorage = new AsyncLocalStorage()
const defaultStore = (a = null) => {
const defaultStore = () => {
const store = new Map()
store.set('schema', 'public')
store.set('defaultSchema', 'ERROR_SCHEMA')
if (a) store.set('a', 'a')
return store
}