Skip to content

Commit

Permalink
#11147: upgrade_environment() synchronizes ticket attributes to tag…
Browse files Browse the repository at this point in the history
…s table in order to reduce transactions in `TicketTagProvider._fetch_tkt_tags()` on first request
  • Loading branch information
jun66j5 committed Oct 28, 2013
1 parent 7bba2e1 commit 15e64a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tractags/db.py
Expand Up @@ -12,6 +12,7 @@

from tractags import db_default
from tractags.api import _
from tractags.ticket import TicketTagProvider


class TagSetup(Component):
Expand Down Expand Up @@ -75,6 +76,10 @@ def upgrade_environment(self, db):
""", (db_default.schema_version,))
self.log.info("Upgraded TracTags db schema from version %d to %d"
% (schema_ver, db_default.schema_version))

TicketTagProvider(self.env)._fetch_tkt_tags(db)
self.log.info("Synchronized ticket attributes to tags table")

db.commit()

# Internal methods
Expand Down

0 comments on commit 15e64a5

Please sign in to comment.