import os.path123# Location of the Sage executable4if 'SAGE_ROOT' in os.environ:5# Assume that the worker should run the same Sage6# that is used to run the web server7sage = os.path.join(os.environ["SAGE_ROOT"], "sage")8else:9# Assume both the web server and the worker have Sage in their paths10sage = "sage"1112# Require the user to accept terms of service before evaluation13requires_tos = True1415db = "sqlalchemy"16db_config = {"uri": "sqlite:///sqlite.db"}1718# db = "web"19# db_config = {"uri": "http://localhost:8889"}2021permalink_server = {22'db': 'sqlalchemy',23'db_config': {'uri': 'sqlite:///sqlite.db'}24}2526pid_file = 'sagecell.pid'27permalink_pid_file = 'sagecell_permalink_server.pid'2829dir = "/tmp/sagecell"3031# Parameters for heartbeat channels checking whether a given kernel is alive.32# Setting first_beat lower than 1.0 may cause JavaScript errors.33beat_interval = 0.534first_beat = 1.03536# Allowed idling between interactions with a kernel37max_timeout = 60 * 1538# Even an actively used kernel will be killed after this time39max_lifespan = 60 * 304041# Recommended settings for kernel providers42provider_settings = {43"max_kernels": 10,44"max_preforked": 1,45# The keys to resource_limits can be any available resources46# for the resource module. See http://docs.python.org/library/resource.html47# for more information (section 35.13.1)48# RLIMIT_AS is more of a suggestion than a hard limit in Mac OS X49# Also, Sage may allocate huge AS, making this limit pointless:50# https://groups.google.com/d/topic/sage-devel/1MM7UPcrW18/discussion51"preforked_rlimits": {52"RLIMIT_CPU": 30, # CPU time in seconds53},54}5556# Location information for kernel providers57provider_info = {58"host": "localhost",59"username": None,60"python": sage + " -python",61"location": os.path.dirname(os.path.abspath(__file__))62}6364providers = [provider_info]656667