Librarian side work

This commit is contained in:
2024-04-08 15:43:31 +02:00
parent 0fe042d0c0
commit 8bda81c80a
2 changed files with 30 additions and 28 deletions
+4 -2
View File
@@ -3,6 +3,7 @@ from threading import Thread
q = Queue()
MAXTHREADS = 39
#MAXTHREADS = 4
DATABASE_PATH = r'C:\\Database\\chunks_1\\'
ENCODING = "utf-8"
CHUNk = "_chunk.txt"
@@ -46,7 +47,7 @@ def consumer(in_q, control_q, doi):
def search_for_doi(doi):
threads = []
work_q = Queue()
work_q = Queue(maxsize=10000000)
control_q = Queue()
t_cons = Thread(target = consumer, args = (work_q, control_q, doi))
threads.append(t_cons)
@@ -68,7 +69,8 @@ def search_for_doi(doi):
return False
if __name__ == "__main__":
if search_for_doi("10.1145/2559206.2567832"):
if search_for_doi("10.1002/9781118786352.wbieg0998.pub2"):
#if search_for_doi("10.1108/gm-02-2016-0025xx"):
print("found")
exit()
else: