@cocalc/database
Version:
CoCalc: code for working with our PostgreSQL database
23 lines • 936 B
JavaScript
;
/*
* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
* License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.STATEMENT_TIMEOUT_MS = void 0;
// Constants related to the database.
const logger_1 = __importDefault(require("@cocalc/backend/logger"));
const L = (0, logger_1.default)("db:consts");
/**
* this is a limit for each query, unless timeout_s is specified.
* https://postgresqlco.nf/en/doc/param/statement_timeout/
*/
exports.STATEMENT_TIMEOUT_MS = 1000 *
(process.env.PG_STATEMENT_TIMEOUT_S
? parseInt(process.env.PG_STATEMENT_TIMEOUT_S)
: 30);
L.debug(`STATEMENT_TIMEOUT_MS=${exports.STATEMENT_TIMEOUT_MS}ms`);
//# sourceMappingURL=consts.js.map