forked from antlampas/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
46 lines (40 loc) · 1.49 KB
/
main.py
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
37
38
39
40
41
42
43
44
45
46
"""
Autore: Francesco Antonetti Lamorgese Passeri
This work is licensed under the Creative Commons Attribution 4.0 International
License. To view a copy of this license, visit
http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative
Commons, PO Box 1866, Mountain View, CA 94042, USA.
"""
from multiprocessing import Process,Lock,Queue
from time import time,sleep
import logging
import sys
import readline
from gestore_pipeline import gestore_pipeline
ipc_entrata = Queue()
lock_ipc_entrata = Lock()
ipc_uscita = Queue()
lock_ipc_uscita = Lock()
file_configurazione = "pipeline.conf"
file_log = "shotstation.log"
segnale_entrata = ""
segnale_uscita = ""
segnale_uscita_spacchettato = []
logging.basicConfig(filename=file_log,level=logging.INFO)
#logging.basicConfig(level=logging.DEBUG)
######################## Codice Personale qui ##################################
######################### Personal Code here ######################## ############
p = gestore_pipeline(file_configurazione,
ipc_uscita,
lock_ipc_uscita,
ipc_entrata,
lock_ipc_entrata)
p.start()
sleep(0.001)
with lock_ipc_uscita:
ipc_uscita.put_nowait("avvia:" + \
str(time()) + ":" + \
str(__name__) + \
":gestore_pipeline")
sleep(0.001)
p.join()