@@ -32,6 +32,9 def multiSchain(child, nProcess=cpu_count(), startDate=None, endDate=None, recei | |||
|
32 | 32 | nFiles = None |
|
33 | 33 | processes = [] |
|
34 | 34 | |
|
35 | ||
|
36 | ||
|
37 | ||
|
35 | 38 | dt1 = datetime.datetime.strptime(startDate, '%Y/%m/%d') |
|
36 | 39 | dt2 = datetime.datetime.strptime(endDate, '%Y/%m/%d') |
|
37 | 40 | days = (dt2 - dt1).days |
@@ -47,29 +50,24 def multiSchain(child, nProcess=cpu_count(), startDate=None, endDate=None, recei | |||
|
47 | 50 | nFiles = q.get() |
|
48 | 51 | firstProcess.terminate() |
|
49 | 52 | skip = int(math.ceil(nFiles/nProcess)) |
|
50 | try: | |
|
51 | 53 |
|
|
52 | 54 |
|
|
53 | 55 |
|
|
54 | 56 |
|
|
55 | 57 |
|
|
56 | 58 |
|
|
57 | except KeyboardInterrupt: | |
|
59 | ||
|
60 | def beforeExit(exctype, value, trace): | |
|
58 | 61 | for process in processes: |
|
59 | 62 | process.terminate() |
|
60 | 63 | process.join() |
|
61 | for process in processes: | |
|
62 | process.join() | |
|
63 | # process.terminate() | |
|
64 | sleep(3) | |
|
64 | sys.excepthook = beforeExit | |
|
65 | 65 | |
|
66 | try: | |
|
67 | while True: | |
|
68 | pass | |
|
69 | except KeyboardInterrupt: | |
|
70 | 66 | for process in processes: |
|
71 | process.terminate() | |
|
72 | 67 | process.join() |
|
68 | process.terminate() | |
|
69 | ||
|
70 | ||
|
73 | 71 | |
|
74 | 72 | class ParameterConf(): |
|
75 | 73 |
@@ -1,1 +1,1 | |||
|
1 | <Project description="Segundo Test" id="191" name="test01"><ProcUnit datatype="ReceiverData" id="1911" inputId="0" name="ReceiverData"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="bool" id="191111" name="realtime" value="1" /><Parameter format="str" id="191112" name="plottypes" value="rti" /><Parameter format="str" id="191113" name="plot_server" value="tcp://10.10.10.82:7000" /></Operation></ProcUnit></Project> No newline at end of file | |
|
1 | <Project description="HF_EXAMPLE" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/home/nanosat/data/hysell_data20/pdata" /><Parameter format="date" id="191113" name="startDate" value="2015/09/26" /><Parameter format="date" id="191114" name="endDate" value="2015/09/26" /><Parameter format="time" id="191115" name="startTime" value="00:00:00" /><Parameter format="time" id="191116" name="endTime" value="23:59:59" /><Parameter format="int" id="191118" name="cursor" value="33" /><Parameter format="int" id="191119" name="skip" value="22" /><Parameter format="int" id="191120" name="delay" value="10" /><Parameter format="int" id="191121" name="walk" value="1" /><Parameter format="int" id="191122" name="online" value="0" /></Operation></ReadUnit><ProcUnit datatype="Spectra" id="1912" inputId="1911" name="SpectraProc"><Operation id="19121" name="run" priority="1" type="self" /><Operation id="19122" name="PublishData" priority="2" type="other"><Parameter format="int" id="191221" name="zeromq" value="1" /><Parameter format="int" id="191222" name="delay" value="1" /></Operation></ProcUnit></Project> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now