Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/conat/hub/changefeeds/util.ts
1453 views
1
export const SERVICE = "changefeeds";
2
export const SUBJECT = "changefeeds.*";
3
4
// This is the max *per account* connected to a single server, just
5
// because everything should have limits.
6
// If the user refreshes their browser, it is still about a minute
7
// before all the changefeeds they had open are free (due to the
8
// SERVER_KEEPALIVE time below).
9
export const MAX_PER_ACCOUNT = 500;
10
export const MAX_GLOBAL = 10000;
11
12
const DEBUG_DEVEL_MODE = false;
13
14
export let CLIENT_KEEPALIVE = 90000;
15
export let SERVER_KEEPALIVE = 45000;
16
export let KEEPALIVE_TIMEOUT = 10000;
17
18
if (DEBUG_DEVEL_MODE) {
19
console.log(
20
"*** WARNING: Using DEBUB_DEVEL_MODE changefeed parameters!! ***",
21
);
22
CLIENT_KEEPALIVE = 6000;
23
SERVER_KEEPALIVE = 3000;
24
KEEPALIVE_TIMEOUT = 1000;
25
}
26
27
export const RESOURCE = "PostgreSQL changefeeds";
28
29