In EventLogging mysql consumer, the events_batch deque is the structure that enables asynchronous communication between the process that reads from Kafka and the process that inserts into MySQL.
However, both processes are pushing/popping events to/from the same end of that deque, which is obviously wrong. They should push to one end, and pop from the other.
The related code is in handlers.py:250-300 and jrm.py:230-250
Some tests need to be updated, too (I think).