search.datamanager ================== .. py:module:: search.datamanager Attributes ---------- .. autoapisummary:: search.datamanager._DATAMANAGERS search.datamanager._DATAMANAGERS Classes ------- .. autoapisummary:: search.datamanager.TaskQueue search.datamanager.IndexerDataManager search.datamanager.IndexerSavepoint Module Contents --------------- .. py:class:: TaskQueue(max_size: int = 0) Bases: :py:obj:`list`\ [\ :py:obj:`onegov.search.indexer.Task`\ ] Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. .. py:attribute:: max_size :value: 0 .. py:method:: append(value: onegov.search.indexer.Task) -> None Append object to the end of the list. .. py:data:: _DATAMANAGERS :type: weakref.WeakKeyDictionary[sqlalchemy.orm.Session, IndexerDataManager] .. py:data:: _DATAMANAGERS .. py:class:: IndexerDataManager(session: sqlalchemy.orm.Session, indexer: onegov.search.indexer.Indexer, max_queue_size: int = 0) Flushes pending indexing tasks to the database. .. py:attribute:: transaction_manager .. py:attribute:: queue :type: TaskQueue | None .. py:attribute:: session :type: sqlalchemy.orm.Session | None .. py:attribute:: indexer :type: onegov.search.indexer.Indexer | None .. py:method:: get_queue(session: sqlalchemy.orm.Session | None, indexer: onegov.search.indexer.Indexer, max_queue_size: int = 0) -> TaskQueue | None :classmethod: .. py:method:: _finish() -> None .. py:method:: sortKey() -> str .. py:method:: commit(transaction: transaction.interfaces.ITransaction) -> None .. py:method:: abort(transaction: transaction.interfaces.ITransaction) -> None .. py:method:: tpc_begin(transaction: transaction.interfaces.ITransaction) -> None .. py:method:: tpc_vote(transaction: transaction.interfaces.ITransaction) -> None .. py:method:: tpc_abort(transaction: transaction.interfaces.ITransaction) -> None .. py:method:: tpc_finish(transaction: transaction.interfaces.ITransaction) -> None .. py:method:: savepoint() -> IndexerSavepoint .. py:class:: IndexerSavepoint(queue: TaskQueue) .. py:attribute:: queue .. py:attribute:: saved_size .. py:method:: rollback() -> None