mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
Invocation of separate threa in get_idp_data() problem resolved
This commit is contained in:
parent
cd3535dcd2
commit
894756ad96
@ -34,20 +34,18 @@ class SAML(object):
|
||||
'SAML: IDP Metadata initial load failed')
|
||||
exit(-1)
|
||||
|
||||
|
||||
def get_idp_data(self):
|
||||
|
||||
### Currently commented out while throwing exception,
|
||||
### will take a look soon
|
||||
# lifetime = timedelta(
|
||||
# minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
|
||||
# if self.idp_timestamp + lifetime < datetime.now():
|
||||
# background_thread = Thread(target=self.retrieve_idp_data)
|
||||
# background_thread.start()
|
||||
lifetime = timedelta(minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
|
||||
|
||||
if self.idp_timestamp + lifetime < datetime.now():
|
||||
background_thread = Thread(target=self.retrieve_idp_data())
|
||||
background_thread.start()
|
||||
|
||||
self.retrieve_idp_data()
|
||||
return self.idp_data
|
||||
|
||||
|
||||
def retrieve_idp_data(self):
|
||||
|
||||
if 'SAML_IDP_SSO_BINDING' in current_app.config:
|
||||
|
Loading…
Reference in New Issue
Block a user