This changes how we handling updating our notification statuses, so that delivered takes precedence over others.
Note: Setting execution_options on the query was necessary because of an error when attempting run the query stating the query could not be evaluate in python. Setting this option to 'fetch' causes a select query or db returning statement to execute with the update effectively doubling the number of queries executed here. We could set this option to False instead if we want the update to just go through when it's executed instead of having the session state be updated.
sqlalchemy docs
issue #1977
How Has This Been Tested?
This will be somewhat tricky to test because part of the reason this change is necessary is because a notification seems to be able to reach another status we consider "final" before reaching a "delivered" status.
[x] unit tests pass
[x] deployed to Dev
We can't really force this to happen, so we'll have to rely on the regression tests
Description
This changes how we handling updating our notification statuses, so that delivered takes precedence over others.
Note: Setting
execution_options
on the query was necessary because of an error when attempting run the query stating the query could not be evaluate in python. Setting this option to'fetch'
causes aselect
query or dbreturning
statement to execute with theupdate
effectively doubling the number of queries executed here. We could set this option toFalse
instead if we want the update to just go through when it's executed instead of having the session state be updated. sqlalchemy docsissue #1977
How Has This Been Tested?
This will be somewhat tricky to test because part of the reason this change is necessary is because a notification seems to be able to reach another status we consider "final" before reaching a "delivered" status.
[x] unit tests pass
[x] deployed to Dev
We can't really force this to happen, so we'll have to rely on the regression tests
Checklist