-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from gregoil/add_server_entrypoint
added server entrypoint, travis, django.setup
- Loading branch information
Showing
7 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
from __future__ import absolute_import | ||
|
||
import pkg_resources | ||
import django | ||
from django.core.management import call_command | ||
|
||
from rotest.common import core_log | ||
from rotest.common.config import DJANGO_MANAGER_PORT | ||
from rotest.api.test_control.session_cleaner import run_session_cleaner | ||
|
||
|
||
def start_server(): | ||
"""Run session manager and Django server according to the config file.""" | ||
django.setup() | ||
|
||
for entry_point in \ | ||
pkg_resources.iter_entry_points("rotest.cli_server_actions"): | ||
core_log.debug("Applying server entry point %s", entry_point.name) | ||
extension_action = entry_point.load() | ||
extension_action() | ||
|
||
run_session_cleaner() | ||
call_command("runserver", "0.0.0.0:{}".format(DJANGO_MANAGER_PORT)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters