-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
36 lines (27 loc) · 697 Bytes
/
main.py
File metadata and controls
36 lines (27 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import gui
from dripReq import createReq
from multiprocessing import Process, Queue
def startGui(q):
try:
g = gui.Gui(q)
except:
print("Something went wrong starting the GUI")
def startReqListener(q):
while True:
if q.empty():
job = q.get()
print(job, " job found")
createReq(job)
def main():
q = Queue()
print("Queue created")
print("GUI PROCESS starting")
tp = Process(target=startGui, args=(q,))
tp.start()
##tp.join()
print("RREQUEST HANDLING PROCESS starting")
qp = Process(target=startReqListener, args=(q,))
qp.start()
##qp.join()
if __name__ == '__main__':
main()