@tstdl/base 0.93.8 → 0.93.9

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.
@@ -14,6 +14,7 @@ import { migrate } from 'drizzle-orm/node-postgres/migrator';
14
14
  import { Pool } from 'pg';
15
15
  import { inject, Injector, ReplaceClass } from '../../injector/index.js';
16
16
  import { isUndefined } from '../../utils/type-guards.js';
17
+ import { millisecondsPerMinute } from '../../utils/units.js';
17
18
  import { DatabaseConfig } from './module.js';
18
19
  /**
19
20
  * Represents the application's database connection.
@@ -33,7 +34,7 @@ Injector.registerSingleton(Database, {
33
34
  throw new Error('Missing postgres connection. Provide it either via injection argument or a provider for DatabaseConfig.');
34
35
  }
35
36
  const pool = new Pool({
36
- idle_in_transaction_session_timeout: 10000,
37
+ idle_in_transaction_session_timeout: 10 * millisecondsPerMinute,
37
38
  ...connection,
38
39
  });
39
40
  context.addDisposeHandler(async () => await pool.end());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.93.8",
3
+ "version": "0.93.9",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"