]> git.treefish.org Git - photosort.git/blobdiff - src/bunch.py
disable sqlite same thread check
[photosort.git] / src / bunch.py
index 689d9b0d53fd7ea696063cdc1fe6dec3989f592c..5bc3eddc5ca49f59f2588e86d85a026911a2d057 100644 (file)
@@ -1,4 +1,5 @@
 import logging
+import os
 import time
 import threading
 
@@ -13,7 +14,7 @@ class Bunch:
             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 = []
@@ -24,7 +25,7 @@ class Bunch:
                     DirTrigger(src_dir_cfg['path'], src_dir_cfg['cool_time'],
                                src_dir_cfg['max_time']),
                     Migrator(src_dir_cfg['path'], cfg['dst_dir']['path'],
-                             os.path.join(cfg['cache_dir'], "%d.db" % idx)),
+                             os.path.join(cache_dir, "%d.db" % idx)),
                     src_dir_cfg['cleanup']
                 )
             )