Commit 7f97015
committed
fix: race condition in getExternalDbSyncFusebox
getExternalDbFusebox used to lazy init the settings singleton.
However, this caused issues.
Prisma's upsert isn't safe from race conditions.
So this could cause collisions/ unique key issues.
Get doesn't need to update anything. Let's just return default values and have the update handle the init.
Tested on local that fusebox updates work fine.1 parent c7e1198 commit 7f97015
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | | - | |
| 21 | + | |
16 | 22 | | |
17 | | - | |
18 | | - | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
0 commit comments