Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions ndscheduler/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ class SchedulerServer:

singleton = None

def __init__(self, scheduler_instance):
# Start scheduler
def __init__(self, scheduler_instance, custom_tornado_settings=None):
"""
Start scheduler

Pass:
scheduler_instance - instance of the `SchedulerManager` class
custom_tornado_settings - optional dictionary of settings, to
be merged if present with the defaults
set below, adding to and/or replacing
the settings in `self.tornado_settings`
"""

self.scheduler_manager = scheduler_instance

self.tornado_settings = dict(
Expand All @@ -37,6 +47,8 @@ def __init__(self, scheduler_instance):
template_path=settings.TEMPLATE_DIR_PATH,
scheduler_manager=self.scheduler_manager
)
if custom_tornado_settings is not None:
self.tornado_settings.update(custom_tornado_settings)

# Setup server
URLS = [
Expand Down