def check_for_new_pdf(self,ev_path):
        if ev_path.endswith(".pdf"):
            if not ev_path.endswith("_ocr.pdf"):
                PyPdfWatcher.events_lock.acquire()
                if not ev_path in PyPdfWatcher.events:
                    PyPdfWatcher.events[ev_path] = time.time()
                    logging.info ("Adding %s to event queue" % ev_path)
                else:
                    if PyPdfWatcher.events[ev_path] == -1:
                        logging.info ( "%s removing from event queue" % (ev_path))
                        del PyPdfWatcher.events[ev_path]
                    else: 
                        newTime = time.time()
                        logging.debug ( "%s already in event queue, updating timestamp to %d" % (ev_path, newTime))
                        PyPdfWatcher.events[ev_path]  = newTime
                PyPdfWatcher.events_lock.release()
Start AMQP Broker
dataset/ETHPy150Open virantha/pypdfocr/pypdfocr/pypdfocr_watcher.py/PyPdfWatcher.check_for_new_pdf--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/bin/jasmind.py/JasminDaemon.startRedisClient