@webqit/webflo 1.0.28 → 1.0.30
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
CHANGED
|
@@ -191,6 +191,8 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
191
191
|
const pgClient = new pg.Pool({
|
|
192
192
|
connectionString: process.env[this.#cx.server.capabilities.database_url_variable],
|
|
193
193
|
database: 'postgres',
|
|
194
|
+
idleTimeoutMillis: 30000, // 30 seconds,
|
|
195
|
+
keepAlive: true
|
|
194
196
|
});
|
|
195
197
|
// Connect
|
|
196
198
|
await pgClient.connect();
|
|
@@ -201,12 +203,12 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
201
203
|
//this.#sdk.db = new ODBClient({ dialect: 'postgres' });
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
|
-
if (this.#cx.server.capabilities?.redis
|
|
206
|
+
if (this.#cx.server.capabilities?.redis) {
|
|
205
207
|
const { Redis } = await import('ioredis');
|
|
206
208
|
this.#sdk.redis = process.env[this.#cx.server.capabilities.redis_url_variable]
|
|
207
209
|
? new Redis(process.env[this.#cx.server.capabilities.redis_url_variable])
|
|
208
210
|
: new Redis;
|
|
209
|
-
console.log('Redis capabilities');
|
|
211
|
+
console.log('Redis capabilities', process.env[this.#cx.server.capabilities.redis_url_variable] ? 'with url' : '');
|
|
210
212
|
}
|
|
211
213
|
if (this.#cx.server.capabilities?.webpush) {
|
|
212
214
|
const { default: webpush } = await import('web-push');
|