cc-1799 : Filesystem
huge speed increase with multi processes.
This commit is contained in:
parent
4c8e6a04ac
commit
4eff714f32
2 changed files with 21 additions and 12 deletions
|
@ -37,11 +37,14 @@ try:
|
|||
logger.info("Initializing event processor")
|
||||
pe = AirtimeProcessEvent(airtime_config=config)
|
||||
|
||||
notifier = AirtimeNotifier(pe.wm, pe, read_freq=1, timeout=1, airtime_config=config)
|
||||
notifier = AirtimeNotifier(pe.wm, pe, read_freq=0.1, timeout=0.1, airtime_config=config)
|
||||
notifier.coalesce_events()
|
||||
|
||||
p = Process(target=notifier.process_file_events, args=(pe.file_events,))
|
||||
p.start()
|
||||
#create 5 worker processes
|
||||
for i in range(5):
|
||||
p = Process(target=notifier.process_file_events, args=(pe.multi_queue,))
|
||||
p.daemon = True
|
||||
p.start()
|
||||
|
||||
signal.signal(signal.SIGTERM, handleSigTERM)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue