mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-14 01:20:27 +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')
|
'SAML: IDP Metadata initial load failed')
|
||||||
exit(-1)
|
exit(-1)
|
||||||
|
|
||||||
|
|
||||||
def get_idp_data(self):
|
def get_idp_data(self):
|
||||||
|
|
||||||
### Currently commented out while throwing exception,
|
lifetime = timedelta(minutes=current_app.config['SAML_METADATA_CACHE_LIFETIME'])
|
||||||
### 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()
|
|
||||||
|
|
||||||
|
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
|
return self.idp_data
|
||||||
|
|
||||||
|
|
||||||
def retrieve_idp_data(self):
|
def retrieve_idp_data(self):
|
||||||
|
|
||||||
if 'SAML_IDP_SSO_BINDING' in current_app.config:
|
if 'SAML_IDP_SSO_BINDING' in current_app.config:
|
||||||
|
Loading…
Reference in New Issue
Block a user