cowbird.handlers.impl.catalog

Module Contents

Classes

Catalog

Keep the catalog index in sync when files are created/deleted/updated.

Attributes

LOGGER

cowbird.handlers.impl.catalog.LOGGER[source]
class cowbird.handlers.impl.catalog.Catalog(settings: cowbird.typedefs.SettingsType, name: str, **kwargs: Any)[source]

Bases: cowbird.handlers.handler.Handler, cowbird.monitoring.fsmonitor.FSMonitor

Keep the catalog index in sync when files are created/deleted/updated.

Create the catalog instance.

Parameters:
  • settings – Cowbird settings for convenience

  • name – Handler name

required_params: List[cowbird.handlers.handler.AnyHandlerParameter][source]
user_created(user_name: str) None[source]
user_deleted(user_name: str) None[source]
abstract permission_created(permission: cowbird.permissions_synchronizer.Permission) None[source]
abstract permission_deleted(permission: cowbird.permissions_synchronizer.Permission) None[source]
static get_instance() Catalog | None[source]

Return the Catalog singleton instance from the class name used to retrieve the FSMonitor from the DB.

on_created(path: str) None[source]

Called when a new path is found.

Parameters:

path – Absolute path of a new file/directory

on_deleted(path: str) None[source]

Called when a path is deleted.

Parameters:

path – Absolute path of a new file/directory

on_modified(path: str) None[source]

Called when a path is updated.

Parameters:

path – Absolute path of a new file/directory

abstract resync() None[source]