prozorro_sale.tools.file_watcher moduleΒΆ

class prozorro_sale.tools.file_watcher.FileObserver(path, callback, *args, **kwargs)[source]

Bases: object

async __aenter__()[source]
async __aexit__(exc_type, exc_val, exc_tb)[source]
__del__()[source]
__enter__()[source]
__executor
__exit__(exc_type, exc_val, exc_tb)[source]
__init__(path, callback, *args, **kwargs)[source]
__slots__ = ('__executor', '__watcher', '__sync_manager', 'files', 'callback', '_stop_watching')
__sync_manager
__watcher
_start()[source]
_stop()[source]
_stop_watching
async _watcher()[source]
callback
static check_modify(files)[source]
files
async join()[source]
static path_to_files(path)[source]

Convert recursive file patch to list files :param path: file patch

Returns

list files

async start()[source]
async stop()[source]
class prozorro_sale.tools.file_watcher.FilesWatcher[source]

Bases: object

__del__()[source]
__init__()[source]
__slots__ = '__watchers'
__watchers
_start()[source]
_stop()[source]
async start(app: Union[aiohttp.web_app.Application, ApplicationWorker])[source]
async stop(app: aiohttp.web_app.Application)[source]
async watch(path, callback, *args, **kwargs)[source]
prozorro_sale.tools.file_watcher.files_watcher = <prozorro_sale.tools.file_watcher.FilesWatcher object>

singleton instance for Requests Wrapper

Type

FileWatcher

prozorro_sale.tools.file_watcher.setup_file_watcher(app: Union[aiohttp.web_app.Application, ApplicationWorker]) None[source]