added some stat counting

This commit is contained in:
Rudi Grinberg 2012-07-13 10:34:01 -04:00
parent 832401704a
commit 309b071142
5 changed files with 14 additions and 10 deletions

View file

@ -7,7 +7,7 @@ from media.monitor.events import PathChannel
from media.monitor.watchersyncer import WatchSyncer
from media.monitor.handler import ProblemFileHandler
from media.monitor.bootstrap import Bootstrapper
from media.monitor.syncdb import SyncDB
from media.monitor.airtime import DBDumper, Connection
channels = {
# note that org channel still has a 'watch' path because that is the path
@ -22,7 +22,8 @@ org = Organizer(channel=channels['org'],target_path=channels['watch'].path)
watch = WatchSyncer(channel=channels['watch'])
problem_files = ProblemFileHandler(channel=channels['badfile'])
# do the bootstrapping before any listening is going one
db = SyncDB(None)
conn = Connection('localhost', 'more', 'shit', 'here')
db = DBDumper(conn).dump_block()
bs = Bootstrapper(db, [channels['org']], [channels['watch']])
bs.flush_organize()
bs.flush_watch()