allura.model.session

class allura.model.session.BatchIndexer(session)

Tracks needed search index operations over the life of a ming.odm.session.ThreadLocalODMSession session, and performs them in a batch when flush() is called.

classmethod flush()

Creates indexing tasks for cached adds and deletes, and resets the caches.

Warning

This method is NOT called automatically when the parent session is flushed. It MUST be called explicitly.

update_index(objects_deleted, arefs_added)

Caches adds and deletes for handling later. Called after each flush of the parent session.

Parameters:
  • objects_deletedallura.model.artifact.Artifact instances that were deleted in the flush.
  • arefs_addedallura.model.artifact.ArtifactReference instances for all Artifact instances that were added or modified in the flush.
allura.model.session.substitute_extensions(*args, **kwds)

Temporarily replace the extensions on a ming.odm.session.ThreadLocalODMSession session.