diff options
author | NavaL <mnandri@thoughtworks.com> | 2016-01-26 10:12:23 +0100 |
---|---|---|
committer | NavaL <mnandri@thoughtworks.com> | 2016-01-26 10:12:23 +0100 |
commit | bb823fda470a0c5e75e8d39da1cb269eaa8fc568 (patch) | |
tree | a51a90d525625212dc72216bb50945b553f7de5b /service/pixelated | |
parent | d95509bf6641ce0722e9f75608360d5b68086678 (diff) |
minor refactorings
Issue #576
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/application.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/service/pixelated/application.py b/service/pixelated/application.py index 07488985..e273612d 100644 --- a/service/pixelated/application.py +++ b/service/pixelated/application.py @@ -160,7 +160,13 @@ def _start_in_multi_user_mode(args, root_resource, services_factory): events_server.ensure_server() config, provider = initialize_leap_provider(args.provider, args.leap_provider_cert, args.leap_provider_cert_fingerprint, args.leap_home) + protected_resource = set_up_protected_resources(root_resource, provider, services_factory) + start_site(args, protected_resource) + reactor.getThreadPool().adjustPoolsize(5, 15) + return defer.succeed(None) + +def set_up_protected_resources(root_resource, provider, services_factory): checker = LeapPasswordChecker(provider) session_checker = SessionChecker() anonymous_resource = LoginResource(services_factory) @@ -170,13 +176,8 @@ def _start_in_multi_user_mode(args, root_resource, services_factory): protected_resource = PixelatedAuthSessionWrapper(_portal, root_resource, anonymous_resource, []) anonymous_resource.set_portal(_portal) - - start_site(args, protected_resource) - root_resource.initialize(_portal) - reactor.getThreadPool().adjustPoolsize(5, 15) - - return defer.succeed(None) + return protected_resource def _start_in_single_user_mode(args, resource, services_factory): |