-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
config_default.py
65 lines (52 loc) · 1.88 KB
/
config_default.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import os.path
# Location of the Sage executable
if 'SAGE_ROOT' in os.environ:
# Assume that the worker should run the same Sage
# that is used to run the web server
sage = os.path.join(os.environ["SAGE_ROOT"], "sage")
else:
# Assume both the web server and the worker have Sage in their paths
sage = "sage"
# Require the user to accept terms of service before evaluation
requires_tos = True
db = "sqlalchemy"
db_config = {"uri": "sqlite:///sqlite.db"}
# db = "web"
# db_config = {"uri": "http://localhost:8889"}
permalink_server = {
'db': 'sqlalchemy',
'db_config': {'uri': 'sqlite:///sqlite.db'}
}
pid_file = 'sagecell.pid'
permalink_pid_file = 'sagecell_permalink_server.pid'
dir = "/tmp/sagecell"
# Parameters for heartbeat channels checking whether a given kernel is alive.
# Setting first_beat lower than 1.0 may cause JavaScript errors.
beat_interval = 0.5
first_beat = 1.0
# Allowed idling between interactions with a kernel
max_timeout = 60 * 15
# Even an actively used kernel will be killed after this time
max_lifespan = 60 * 30
# Recommended settings for kernel providers
provider_settings = {
"max_kernels": 10,
"max_preforked": 1,
# The keys to resource_limits can be any available resources
# for the resource module. See http://docs.python.org/library/resource.html
# for more information (section 35.13.1)
# RLIMIT_AS is more of a suggestion than a hard limit in Mac OS X
# Also, Sage may allocate huge AS, making this limit pointless:
# https://groups.google.com/d/topic/sage-devel/1MM7UPcrW18/discussion
"preforked_rlimits": {
"RLIMIT_CPU": 30, # CPU time in seconds
},
}
# Location information for kernel providers
provider_info = {
"host": "localhost",
"username": None,
"python": sage + " -python",
"location": os.path.dirname(os.path.abspath(__file__))
}
providers = [provider_info]