Commit 5c965d3
committed
Override Knex pooling behavior
Knex uses tarn to handle connection pooling. Tarn doesn't work well for
connection-less querying. By default it wants to keep connections
around, which prevents Lambda functions from returning as the event loop
still has things in it.
This change creates a dummy pool for Knex that returns query parameters
with an incrementing Knex connection ID, allowing for any number of
simultaneous queries without any overhead.1 parent 78aed1b commit 5c965d3
1 file changed
+25
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
104 | 99 | | |
105 | | - | |
| 100 | + | |
106 | 101 | | |
107 | | - | |
108 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| |||
0 commit comments