Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read event handler definitions from database only if config changed #1823

Closed
fredreichbier opened this issue Aug 27, 2019 · 0 comments · Fixed by #1824

Comments

@fredreichbier
Copy link
Member

commented Aug 27, 2019

Currently, privacyIDEA reads all event handler definitions from the database (along with their conditions and options) on each request. This is because each request instantiates a new EventConfiguration object:

class EventConfiguration(object):

Analogously to policies, we could only read event handler definitions from the database if the config timestamp has changed. This would save us at least one SQL query per request.

Then, event handler definitions would also respect the PI_CHECK_RELOAD_CONFIG setting.

@fredreichbier fredreichbier self-assigned this Aug 27, 2019

@fredreichbier fredreichbier added this to the 3.2 milestone Aug 27, 2019

@fredreichbier fredreichbier added this to To do in privacyIDEA 3.2 via automation Aug 27, 2019

@fredreichbier fredreichbier moved this from To do to In progress in privacyIDEA 3.2 Aug 27, 2019

fredreichbier added a commit that referenced this issue Aug 27, 2019
Only re-read event handler definitions if the configuration has changed
This is achieved by storing the currently defined event handlers in the
shared config object.

Fixes #1823
fredreichbier added a commit that referenced this issue Aug 27, 2019
Only re-read event handler definitions if the configuration has changed
This is achieved by storing the currently defined event handlers in the
shared config object.

Fixes #1823

privacyIDEA 3.2 automation moved this from In progress to Done Aug 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.