Python parallel thread that consume Watchdog queue events

前端 未结 2 1404
孤独总比滥情好
孤独总比滥情好 2021-01-23 21:48

I have this code that should put an event in a queue each time an external program (TCPdump) creates a *.pcap file in my directory. My problem is that I always get an empty que

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-23 22:19

    There is an excellent library which provides concurrent access to the items within that queue. The queue is also persistent[file based as well as database based], so if the program crashes, you can still consume events from the point where the program crashed.

    persist-queue

提交回复
热议问题