Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
django-cas-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Samir
django-cas-server
Commits
bfcf410f
Commit
bfcf410f
authored
Dec 12, 2015
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put maximum number of parallel SLO requests in config
parent
99d27fe1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
cas_server/default_settings.py
cas_server/default_settings.py
+4
-0
cas_server/models.py
cas_server/models.py
+6
-2
No files found.
cas_server/default_settings.py
View file @
bfcf410f
...
...
@@ -56,6 +56,10 @@ setting_default('CAS_PROXY_GRANTING_TICKET_PREFIX', 'PGT')
# Services MUST be able to handle PGTIOUs of up to 64 characters in length.
setting_default
(
'CAS_PROXY_GRANTING_TICKET_IOU_PREFIX'
,
'PGTIOU'
)
# Maximum number of parallel single log out requests send
# if more requests need to be send, there are queued
setting_default
(
'CAS_SLO_MAX_PARALLEL_REQUESTS'
,
10
)
setting_default
(
'CAS_SQL_HOST'
,
'localhost'
)
setting_default
(
'CAS_SQL_USERNAME'
,
''
)
setting_default
(
'CAS_SQL_PASSWORD'
,
''
)
...
...
cas_server/models.py
View file @
bfcf410f
...
...
@@ -67,7 +67,9 @@ class User(models.Model):
def
logout
(
self
,
request
=
None
):
"""Sending SLO request to all services the user logged in"""
async_list
=
[]
session
=
FuturesSession
(
executor
=
ThreadPoolExecutor
(
max_workers
=
10
))
session
=
FuturesSession
(
executor
=
ThreadPoolExecutor
(
max_workers
=
settings
.
CAS_SLO_MAX_PARALLEL_REQUESTS
)
)
# first invalidate all Tickets
ticket_classes
=
[
ProxyGrantingTicket
,
ServiceTicket
,
ProxyTicket
]
for
ticket_class
in
ticket_classes
:
...
...
@@ -357,7 +359,9 @@ class Ticket(models.Model):
# sending SLO to timed-out validated tickets
if
cls
.
TIMEOUT
and
cls
.
TIMEOUT
>
0
:
async_list
=
[]
session
=
FuturesSession
(
executor
=
ThreadPoolExecutor
(
max_workers
=
10
))
session
=
FuturesSession
(
executor
=
ThreadPoolExecutor
(
max_workers
=
settings
.
CAS_SLO_MAX_PARALLEL_REQUESTS
)
)
queryset
=
cls
.
objects
.
filter
(
creation__lt
=
(
timezone
.
now
()
-
timedelta
(
seconds
=
cls
.
TIMEOUT
))
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment