Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 39537
1
###############################################################################
2
#
3
# CoCalc: Collaborative Calculation in the Cloud
4
#
5
# Copyright (C) 2016, Sagemath Inc.
6
#
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#
20
###############################################################################
21
22
# these times in minutes are used for active/recently edited projects and accounts in postgres-server-queries.coffee's get_stats
23
exports.RECENT_TIMES =
24
active : 5
25
last_hour : 60
26
last_day : 60*24
27
last_week : 60*24*7
28
last_month : 60*24*30
29
30
# this translates the semantic meanings to the keys used in the DB, also prevents typos!
31
exports.RECENT_TIMES_KEY =
32
active : "5min"
33
last_hour : "1h"
34
last_day : "1d"
35
last_week : "7d"
36
last_month : "30d"
37
38
39
db_schema = require('./db-schema')
40
schema = exports.SCHEMA = db_schema.SCHEMA
41
exports.client_db = db_schema.client_db
42
exports.site_settings_conf = db_schema.site_settings_conf
43
44
# Load the syncstring extensions to the schema
45
require('./syncstring_schema')
46
47
48
# Will import some other modules and make them available here, since the code
49
# used to be in this file, and this is assumed in code elsewhere. Will change later.
50
51
exports.COMPUTE_STATES = require('./compute-states').COMPUTE_STATES
52
53
upgrade_spec = require('./upgrade-spec')
54
exports.PROJECT_UPGRADES = upgrade_spec.upgrades
55
56
exports.DEFAULT_QUOTAS = upgrade_spec.DEFAULT_QUOTAS
57
58