peek_plugin_base.worker package

Submodules

peek_plugin_base.worker.CeleryApp module

peek_plugin_base.worker.CeleryDbConn module

peek_plugin_base.worker.CeleryDbConn.getDbEngine()[source]
peek_plugin_base.worker.CeleryDbConn.getDbSession()[source]
peek_plugin_base.worker.CeleryDbConn.prefetchDeclarativeIds(Declarative, count)Optional[Iterable[int]][source]

Prefetch Declarative IDs

This function prefetches a chunk of IDs from a database sequence. Doing this allows us to preallocate the IDs before an insert, which significantly speeds up :

  • Orm inserts, especially those using inheritance

  • When we need the ID to assign it to a related object that we’re also inserting.

Parameters
  • Declarative – The SQLAlchemy declarative class. (The class that inherits from DeclarativeBase)

  • count – The number of IDs to prefetch

Returns

An iterable that dispenses the new IDs

peek_plugin_base.worker.CeleryDbConn.setConnStringForWindows()[source]

Set Conn String for Windiws

Windows has a different way of forking processes, which causes the @worker_process_init.connect signal not to work in “CeleryDbConnInit”

peek_plugin_base.worker.CeleryDbConnInit module

peek_plugin_base.worker.CeleryDbConnInit.initWorkerConnString(sender, **kwargs)[source]
peek_plugin_base.worker.CeleryDbConnInit.initWorkerProcessDbConn(**kwargs)[source]
peek_plugin_base.worker.CeleryDbConnInit.shutdownWorkerProcessDbConn(**kwargs)[source]
peek_plugin_base.worker.CeleryDbConnInit.taskEndCloseSession(**kwargs)[source]

peek_plugin_base.worker.CeleryFileStorageConfig module

peek_plugin_base.worker.CeleryFileStorageConfig.getWorkerPluginDataDir(pluginPackageName: str)[source]

peek_plugin_base.worker.CeleryLogicServerInfoConfig module

peek_plugin_base.worker.CeleryLogicServerInfoConfig.getLogicServiceHttpDetails()peek_plugin_base.PeekPlatformServerInfoHookABC.PeekPlatformServerInfoHookABC[source]

peek_plugin_base.worker.PluginWorkerEntryHookABC module