@jcbuisson/express-x-drizzle 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/drizzle-plugins.mjs +4 -1
package/package.json
CHANGED
package/src/drizzle-plugins.mjs
CHANGED
|
@@ -166,7 +166,10 @@ export function drizzleOfflinePlugin(app, db, metadata, models) {
|
|
|
166
166
|
console.log('*** err sync', err)
|
|
167
167
|
throw err
|
|
168
168
|
} finally {
|
|
169
|
-
syncMutexes.get(mutexKey)
|
|
169
|
+
const mutex = syncMutexes.get(mutexKey)
|
|
170
|
+
mutex.release()
|
|
171
|
+
// Remove idle mutexes so the Map stays bounded for dynamic where clauses.
|
|
172
|
+
if (mutex.queue.length === 0) syncMutexes.delete(mutexKey)
|
|
170
173
|
}
|
|
171
174
|
},
|
|
172
175
|
})
|