import logging
+import os
import time
import threading
self.migrator = migrator
self.cleanup = cleanup
- def __init__(self, idx, cfg):
+ def __init__(self, idx, cache_dir, cfg):
self._idx = idx
source_idx = 1
self._sources = []
for src_dir_cfg in cfg['src_dirs']:
self._sources.append(
+ reg_db = os.path.join(cache_dir, "reg_%d_%d.db" % (idx, source_idx))
Bunch.TriggeredSource(
source_idx,
DirTrigger(src_dir_cfg['path'], src_dir_cfg['cool_time'],
src_dir_cfg['max_time']),
- Migrator(src_dir_cfg['path'], cfg['dst_dir']['path']),
+ Migrator(src_dir_cfg['path'], cfg['dst_dir']['path'], reg_db),
src_dir_cfg['cleanup']
)
)