processview 0.2.1__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/__pycache__/version.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/__pycache__/helpers.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/__pycache__/superviseprocess.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/helpers.py +59 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/manager/__pycache__/manager.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/manager/manager.py +6 -4
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/gui/__pycache__/processmanager.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/resources/__pycache__/__init__.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/version.py +1 -1
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/{processview-0.2.1-py3.7.egg-info → processview-0.2.3-py3.7.egg-info}/PKG-INFO +1 -1
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/{processview-0.2.1-py3.7.egg-info → processview-0.2.3-py3.7.egg-info}/SOURCES.txt +2 -0
- /home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/{processview-0.2.1-py3.7.egg-info → processview-0.2.3-py3.7.egg-info}/dependency_links.txt +0 -0
- /home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/{processview-0.2.1-py3.7.egg-info → processview-0.2.3-py3.7.egg-info}/not-zip-safe +0 -0
- /home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/{processview-0.2.1-py3.7.egg-info → processview-0.2.3-py3.7.egg-info}/requires.txt +0 -0
- /home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/{processview-0.2.1-py3.7.egg-info → processview-0.2.3-py3.7.egg-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# /*##########################################################################
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
|
|
5
|
+
#
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
# furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
# THE SOFTWARE.
|
|
23
|
+
#
|
|
24
|
+
# ###########################################################################*/
|
|
25
|
+
"""helper functions to notify state change for example"""
|
|
26
|
+
|
|
27
|
+
__authors__ = ["H. Payno"]
|
|
28
|
+
__license__ = "MIT"
|
|
29
|
+
__date__ = "13/04/2021"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
from processview.core.manager import ProcessManager
|
|
33
|
+
from processview.core.manager import DatasetState
|
|
34
|
+
from processview.core.superviseprocess import SuperviseProcess
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def notify_skip(process, dataset, details=None):
|
|
38
|
+
ProcessManager().notify_dataset_state(
|
|
39
|
+
dataset=dataset, process=process, state=DatasetState.SKIPPED, details=details
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def notify_pending(process, dataset, details=None):
|
|
44
|
+
ProcessManager().notify_dataset_state(
|
|
45
|
+
dataset=dataset, process=process, state=DatasetState.PENDING, details=details
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def notify_succeed(process, dataset, details=None):
|
|
50
|
+
ProcessManager().notify_dataset_state(
|
|
51
|
+
dataset=dataset, process=process, state=DatasetState.SUCCEED, details=details
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def notify_failed(process, dataset, details=None):
|
|
56
|
+
ProcessManager().notify_dataset_state(
|
|
57
|
+
dataset=dataset, process=process, state=DatasetState.FAILED, details=details
|
|
58
|
+
)
|
|
59
|
+
|
|
Binary file
|
|
@@ -315,15 +315,17 @@ class ProcessManager:
|
|
|
315
315
|
self._newProcessCallback.add(callback)
|
|
316
316
|
|
|
317
317
|
def remove_new_process_callback(self, callback):
|
|
318
|
-
|
|
319
|
-
self._newProcessCallback
|
|
318
|
+
with self.lock:
|
|
319
|
+
if callback in self._newProcessCallback:
|
|
320
|
+
self._newProcessCallback.remove(callback)
|
|
320
321
|
|
|
321
322
|
def add_process_removed_callback(self, callback):
|
|
322
323
|
self._processRemovedCallback.add(callback)
|
|
323
324
|
|
|
324
325
|
def remove_process_removed_callback(self, callback):
|
|
325
|
-
|
|
326
|
-
self._processRemovedCallback
|
|
326
|
+
with self.lock:
|
|
327
|
+
if callback in self._processRemovedCallback:
|
|
328
|
+
self._processRemovedCallback.remove(callback)
|
|
327
329
|
|
|
328
330
|
def clear(self):
|
|
329
331
|
"""
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
LICENSE
|
|
1
2
|
README.md
|
|
2
3
|
setup.py
|
|
3
4
|
processview/__init__.py
|
|
@@ -11,6 +12,7 @@ processview.egg-info/requires.txt
|
|
|
11
12
|
processview.egg-info/top_level.txt
|
|
12
13
|
processview/core/__init__.py
|
|
13
14
|
processview/core/dataset.py
|
|
15
|
+
processview/core/helpers.py
|
|
14
16
|
processview/core/setup.py
|
|
15
17
|
processview/core/superviseprocess.py
|
|
16
18
|
processview/core/manager/__init__.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|