[sqlalchemy-20] Add missing DB context decorator

This fixes two queries still being executed without the context
decorator, which is causing warning messages.

Closes-Bug: #1995738
Change-Id: I61692e09119751ac7e19cecf6bf0b4b3a9fb38c7
This commit is contained in:
Rodolfo Alonso Hernandez 2022-12-02 02:38:36 +01:00
parent 4fe1764676
commit 234c5a376b

View File

@ -255,6 +255,7 @@ class TrackedResource(BaseResource):
{'project_id': project_id, 'resource': self.name})
return usage_info
@db_api.CONTEXT_WRITER
def resync(self, context, project_id):
if (project_id not in self._out_of_sync_projects or
not self._track_resource_events):