mxcubecore 1.392.0__py3-none-any.whl → 1.394.0__py3-none-any.whl
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.
Potentially problematic release.
This version of mxcubecore might be problematic. Click here for more details.
- mxcubecore/BaseHardwareObjects.py +1 -1
- mxcubecore/Command/Epics.py +2 -2
- mxcubecore/Command/Pool.py +4 -4
- mxcubecore/Command/Sardana.py +7 -3
- mxcubecore/Command/Taco.py +2 -2
- mxcubecore/Command/Tango.py +2 -2
- mxcubecore/Command/Tine.py +1 -1
- mxcubecore/Command/exporter/ExporterClient.py +2 -2
- mxcubecore/Command/exporter/StandardClient.py +4 -3
- mxcubecore/HardwareObjects/ALBA/ALBAAutoProcessing.py +4 -7
- mxcubecore/HardwareObjects/ALBA/ALBABackLight.py +6 -7
- mxcubecore/HardwareObjects/ALBA/ALBABeamInfo.py +2 -4
- mxcubecore/HardwareObjects/ALBA/ALBACats.py +19 -25
- mxcubecore/HardwareObjects/ALBA/ALBAClusterJob.py +10 -11
- mxcubecore/HardwareObjects/ALBA/ALBACollect.py +49 -71
- mxcubecore/HardwareObjects/ALBA/ALBADataAnalysis.py +26 -31
- mxcubecore/HardwareObjects/ALBA/ALBAEnergy.py +1 -5
- mxcubecore/HardwareObjects/ALBA/ALBAEpsActuator.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAFastShutter.py +1 -1
- mxcubecore/HardwareObjects/ALBA/ALBAFlux.py +2 -6
- mxcubecore/HardwareObjects/ALBA/ALBAFrontLight.py +5 -9
- mxcubecore/HardwareObjects/ALBA/ALBAISPyBClient.py +4 -4
- mxcubecore/HardwareObjects/ALBA/ALBAMiniDiff.py +20 -27
- mxcubecore/HardwareObjects/ALBA/ALBAPilatus.py +12 -15
- mxcubecore/HardwareObjects/ALBA/ALBASession.py +1 -4
- mxcubecore/HardwareObjects/ALBA/ALBAZoomMotor.py +10 -14
- mxcubecore/HardwareObjects/ALBA/ALBAZoomMotorAutoBrightness.py +7 -11
- mxcubecore/HardwareObjects/ALBA/XalocMiniDiff.py +7 -8
- mxcubecore/HardwareObjects/BeamInfo.py +4 -6
- mxcubecore/HardwareObjects/Beamline.py +6 -7
- mxcubecore/HardwareObjects/BeamlineActions.py +3 -7
- mxcubecore/HardwareObjects/BlissHutchTrigger.py +3 -3
- mxcubecore/HardwareObjects/BlissMotorWPositions.py +4 -7
- mxcubecore/HardwareObjects/Cats90.py +33 -43
- mxcubecore/HardwareObjects/CatsBessy.py +1 -1
- mxcubecore/HardwareObjects/CatsMaint.py +2 -2
- mxcubecore/HardwareObjects/CentringMath.py +5 -4
- mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +4 -4
- mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +2 -0
- mxcubecore/HardwareObjects/DESY/P11Collect.py +7 -7
- mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +14 -16
- mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +6 -10
- mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +6 -4
- mxcubecore/HardwareObjects/DataPublisher.py +2 -3
- mxcubecore/HardwareObjects/EDNACharacterisation.py +2 -4
- mxcubecore/HardwareObjects/EMBL/EMBLBeam.py +3 -3
- mxcubecore/HardwareObjects/EMBL/EMBLBeamCentering.py +2 -4
- mxcubecore/HardwareObjects/EMBL/EMBLBeamFocusing.py +3 -3
- mxcubecore/HardwareObjects/EMBL/EMBLBeamlineTest.py +2 -0
- mxcubecore/HardwareObjects/EMBL/EMBLDoorInterlock.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLEnergy.py +10 -18
- mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +10 -12
- mxcubecore/HardwareObjects/EMBL/EMBLFlux.py +10 -12
- mxcubecore/HardwareObjects/EMBL/EMBLMachineInfo.py +2 -2
- mxcubecore/HardwareObjects/EMBL/EMBLMiniDiff.py +18 -18
- mxcubecore/HardwareObjects/EMBL/EMBLMotorsGroup.py +6 -9
- mxcubecore/HardwareObjects/EMBL/EMBLOnlineProcessing.py +6 -6
- mxcubecore/HardwareObjects/EMBL/EMBLPPUControl.py +1 -1
- mxcubecore/HardwareObjects/EMBL/EMBLSSXChip.py +1 -4
- mxcubecore/HardwareObjects/EMBL/EMBLSlitBox.py +1 -3
- mxcubecore/HardwareObjects/EMBL/EMBLTableMotor.py +2 -3
- mxcubecore/HardwareObjects/EMBL/EMBLXRFSpectrum.py +4 -4
- mxcubecore/HardwareObjects/EMBL/EMBLXrayImaging.py +1 -1
- mxcubecore/HardwareObjects/EMBL/TINEMotor.py +2 -2
- mxcubecore/HardwareObjects/EMBLFlexHCD.py +5 -5
- mxcubecore/HardwareObjects/EMBLFlexHarvester.py +2 -2
- mxcubecore/HardwareObjects/ESRF/ESRFBeam.py +3 -5
- mxcubecore/HardwareObjects/ESRF/ESRFBeamInfo.py +1 -5
- mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py +2 -2
- mxcubecore/HardwareObjects/ESRF/ESRFEnergyScan.py +3 -3
- mxcubecore/HardwareObjects/ESRF/ESRFMetadataManagerClient.py +1 -1
- mxcubecore/HardwareObjects/ESRF/ESRFMultiCollect.py +7 -7
- mxcubecore/HardwareObjects/ESRF/ESRFPhotonFlux.py +2 -8
- mxcubecore/HardwareObjects/ESRF/ESRFSC3.py +11 -18
- mxcubecore/HardwareObjects/ESRF/ID29HutchTrigger.py +3 -3
- mxcubecore/HardwareObjects/ESRF/MD2MultiCollect.py +4 -4
- mxcubecore/HardwareObjects/ESRF/SSXICATLIMS.py +9 -6
- mxcubecore/HardwareObjects/EdnaWorkflow.py +9 -11
- mxcubecore/HardwareObjects/Energy.py +11 -15
- mxcubecore/HardwareObjects/ExporterMotor.py +1 -2
- mxcubecore/HardwareObjects/FlexHCD.py +7 -8
- mxcubecore/HardwareObjects/FlexHCDMaintenance.py +1 -1
- mxcubecore/HardwareObjects/GenericDiffractometer.py +26 -46
- mxcubecore/HardwareObjects/Gphl/CollectEmulator.py +6 -7
- mxcubecore/HardwareObjects/Gphl/GphlQueueEntry.py +2 -2
- mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py +29 -43
- mxcubecore/HardwareObjects/Gphl/GphlWorkflowConnection.py +25 -35
- mxcubecore/HardwareObjects/ICATLIMS.py +17 -13
- mxcubecore/HardwareObjects/LNLS/EPICSMotor.py +1 -4
- mxcubecore/HardwareObjects/LNLS/LNLSAperture.py +2 -5
- mxcubecore/HardwareObjects/LNLS/LNLSCamera.py +14 -16
- mxcubecore/HardwareObjects/LNLS/LNLSCollect.py +21 -29
- mxcubecore/HardwareObjects/LNLS/LNLSDetDistMotor.py +7 -11
- mxcubecore/HardwareObjects/LNLS/LNLSEnergy.py +4 -6
- mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +55 -51
- mxcubecore/HardwareObjects/LNLS/LNLSTransmission.py +4 -7
- mxcubecore/HardwareObjects/LdapAuthenticator.py +11 -15
- mxcubecore/HardwareObjects/Lima2Detector.py +1 -1
- mxcubecore/HardwareObjects/LimaEigerDetector.py +1 -1
- mxcubecore/HardwareObjects/LimaPilatusDetector.py +1 -4
- mxcubecore/HardwareObjects/MAXIV/MAXIVAutoProcessing.py +3 -5
- mxcubecore/HardwareObjects/MD3UP.py +1 -2
- mxcubecore/HardwareObjects/MachCurrent.py +5 -5
- mxcubecore/HardwareObjects/Marvin.py +23 -35
- mxcubecore/HardwareObjects/Microdiff.py +6 -8
- mxcubecore/HardwareObjects/MicrodiffActuator.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffBeamstop.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
- mxcubecore/HardwareObjects/MicrodiffKappaMotor.py +3 -4
- mxcubecore/HardwareObjects/MiniDiff.py +35 -57
- mxcubecore/HardwareObjects/MotorWPositions.py +4 -2
- mxcubecore/HardwareObjects/PlateManipulator.py +2 -2
- mxcubecore/HardwareObjects/ProposalTypeISPyBLims.py +8 -16
- mxcubecore/HardwareObjects/PyISPyBClient.py +8 -5
- mxcubecore/HardwareObjects/QtGraphicsLib.py +2 -2
- mxcubecore/HardwareObjects/QtGraphicsManager.py +13 -19
- mxcubecore/HardwareObjects/QtInstanceServer.py +27 -55
- mxcubecore/HardwareObjects/QtLimaVideo.py +1 -5
- mxcubecore/HardwareObjects/QueueManager.py +7 -9
- mxcubecore/HardwareObjects/QueueModel.py +6 -8
- mxcubecore/HardwareObjects/RedisClient.py +12 -16
- mxcubecore/HardwareObjects/SC3.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Attenuator.py +1 -3
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1BeamInfo.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1CatsMaint.py +3 -4
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Collect.py +11 -11
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Cryotong.py +8 -18
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Energy.py +6 -7
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1EnergyScan.py +21 -31
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Environment.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1MiniDiff.py +11 -21
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pilatus.py +9 -9
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pss.py +1 -2
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Resolution.py +1 -5
- mxcubecore/HardwareObjects/SOLEIL/PX1/PX1TangoLight.py +3 -8
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Attenuator.py +9 -13
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Collect.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Diffractometer.py +22 -22
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Energy.py +4 -6
- mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Guillotine.py +2 -2
- mxcubecore/HardwareObjects/SOLEIL/SOLEILCatsMaint.py +6 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILEnergyScan.py +44 -56
- mxcubecore/HardwareObjects/SOLEIL/SOLEILGuillotine.py +2 -2
- mxcubecore/HardwareObjects/SOLEIL/SOLEILISPyBClient.py +10 -10
- mxcubecore/HardwareObjects/SOLEIL/SOLEILMachineInfo.py +4 -8
- mxcubecore/HardwareObjects/SOLEIL/SOLEILPss.py +3 -4
- mxcubecore/HardwareObjects/SOLEIL/SOLEILRuche.py +1 -1
- mxcubecore/HardwareObjects/SOLEIL/TangoDCMotor.py +10 -16
- mxcubecore/HardwareObjects/SardanaMotor.py +4 -5
- mxcubecore/HardwareObjects/Session.py +1 -1
- mxcubecore/HardwareObjects/SpecMotorWPositions.py +5 -9
- mxcubecore/HardwareObjects/SpecMotorWSpecPositions.py +2 -4
- mxcubecore/HardwareObjects/SpecShell.py +7 -9
- mxcubecore/HardwareObjects/SpecState.py +5 -7
- mxcubecore/HardwareObjects/StateMachine.py +9 -10
- mxcubecore/HardwareObjects/TangoLimaMpegVideo.py +2 -3
- mxcubecore/HardwareObjects/TangoLimaVideo.py +3 -4
- mxcubecore/HardwareObjects/TangoMachineInfo.py +1 -3
- mxcubecore/HardwareObjects/TangoMotor.py +1 -1
- mxcubecore/HardwareObjects/UserTypeISPyBLims.py +8 -8
- mxcubecore/HardwareObjects/XMLRPCServer.py +20 -22
- mxcubecore/HardwareObjects/abstract/AbstractAperture.py +6 -11
- mxcubecore/HardwareObjects/abstract/AbstractCollect.py +6 -16
- mxcubecore/HardwareObjects/abstract/AbstractDetector.py +2 -7
- mxcubecore/HardwareObjects/abstract/AbstractEnergyScan.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractLims.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractMultiCollect.py +6 -6
- mxcubecore/HardwareObjects/abstract/AbstractNState.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractProcedure.py +3 -4
- mxcubecore/HardwareObjects/abstract/AbstractSampleChanger.py +1 -1
- mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +5 -5
- mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +2 -0
- mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +11 -13
- mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py +3 -3
- mxcubecore/HardwareObjects/abstract/sample_changer/Crims.py +8 -0
- mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +12 -13
- mxcubecore/HardwareObjects/mockup/EnergyScanMockup.py +10 -11
- mxcubecore/HardwareObjects/mockup/ISPyBClientMockup.py +6 -6
- mxcubecore/HardwareObjects/mockup/ISPyBRestClientMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/LimaDetectorMockup.py +1 -2
- mxcubecore/HardwareObjects/mockup/MDCameraMockup.py +5 -6
- mxcubecore/HardwareObjects/mockup/MicrodiffInOutMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/MultiCollectMockup.py +1 -1
- mxcubecore/HardwareObjects/mockup/ShapeHistoryMockup.py +1 -2
- mxcubecore/HardwareObjects/mockup/XRFMockup.py +3 -6
- mxcubecore/TaskUtils.py +2 -0
- mxcubecore/queue_entry/base_queue_entry.py +2 -2
- mxcubecore/queue_entry/energy_scan.py +1 -1
- mxcubecore/saferef.py +2 -1
- mxcubecore/utils/qt_import.py +8 -7
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/METADATA +1 -1
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/RECORD +195 -195
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING +0 -0
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/COPYING.LESSER +0 -0
- {mxcubecore-1.392.0.dist-info → mxcubecore-1.394.0.dist-info}/WHEEL +0 -0
|
@@ -46,26 +46,20 @@ class ProposalTypeISPyBLims(ISPyBAbstractLIMS):
|
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
if self.authServerType == "ldap":
|
|
49
|
-
|
|
50
|
-
"Starting LDAP authentication %s" % user_name
|
|
51
|
-
)
|
|
49
|
+
self.log.debug("Starting LDAP authentication %s" % user_name)
|
|
52
50
|
ok = self.ldap_login(user_name, psd)
|
|
53
51
|
elif self.authServerType == "ispyb":
|
|
54
|
-
|
|
52
|
+
self.log.debug("ISPyB login")
|
|
55
53
|
ok, _ = self.ispyb_login(user_name, psd)
|
|
56
54
|
else:
|
|
57
55
|
raise Exception("Authentication server type is not defined")
|
|
58
56
|
|
|
59
57
|
if not ok:
|
|
60
58
|
# refuse Login
|
|
61
|
-
|
|
62
|
-
"Authentication with %s failed" % self.authServerType
|
|
63
|
-
)
|
|
59
|
+
self.log.error("Authentication with %s failed" % self.authServerType)
|
|
64
60
|
raise Exception("Authentication failed")
|
|
65
61
|
|
|
66
|
-
|
|
67
|
-
"User %s logged in %s" % (user_name, self.authServerType)
|
|
68
|
-
)
|
|
62
|
+
self.log.debug("User %s logged in %s" % (user_name, self.authServerType))
|
|
69
63
|
|
|
70
64
|
def is_session_already_active_by_code(self, code: str, number: str) -> bool:
|
|
71
65
|
# If current selected session is already selected no need to do
|
|
@@ -84,18 +78,16 @@ class ProposalTypeISPyBLims(ISPyBAbstractLIMS):
|
|
|
84
78
|
Given a proposal name it will select a session that is scheduled on this beamline in the current timeslot
|
|
85
79
|
"""
|
|
86
80
|
if self.is_session_already_active(self.session_manager.active_session):
|
|
87
|
-
|
|
81
|
+
self.log.debug("[ISPYB] is_session_already_active")
|
|
88
82
|
return self.session_manager.active_session
|
|
89
83
|
|
|
90
84
|
if len(self.session_manager.sessions) == 0:
|
|
91
|
-
|
|
92
|
-
"Session list is empty. No session candidates"
|
|
93
|
-
)
|
|
85
|
+
self.log.error("Session list is empty. No session candidates")
|
|
94
86
|
raise Exception("No sessions available")
|
|
95
87
|
|
|
96
88
|
if len(self.session_manager.sessions) == 1:
|
|
97
89
|
self.session_manager.active_session = self.session_manager.sessions[0]
|
|
98
|
-
|
|
90
|
+
self.log.debug(
|
|
99
91
|
"Session list contains a single session. proposal_name=%s",
|
|
100
92
|
self.session_manager.active_session.proposal_name,
|
|
101
93
|
)
|
|
@@ -111,7 +103,7 @@ class ProposalTypeISPyBLims(ISPyBAbstractLIMS):
|
|
|
111
103
|
)
|
|
112
104
|
]
|
|
113
105
|
if len(session_list) > 1:
|
|
114
|
-
|
|
106
|
+
self.log.warning(
|
|
115
107
|
"Session not found in the local list of sessions. Found %s sessions. proposal_name=%s"
|
|
116
108
|
% (len(session_list), proposal_name)
|
|
117
109
|
)
|
|
@@ -4,7 +4,6 @@ A client for PyISPyB Webservices.
|
|
|
4
4
|
|
|
5
5
|
import datetime
|
|
6
6
|
import json
|
|
7
|
-
import logging
|
|
8
7
|
import os
|
|
9
8
|
|
|
10
9
|
import pyispyb_client
|
|
@@ -64,7 +63,7 @@ class PyISPyBClient(HardwareObject):
|
|
|
64
63
|
try:
|
|
65
64
|
self.authenticate()
|
|
66
65
|
except Exception:
|
|
67
|
-
|
|
66
|
+
self.log.exception("")
|
|
68
67
|
|
|
69
68
|
def authenticate(self):
|
|
70
69
|
with pyispyb_client.ApiClient(self._configuration) as api_client:
|
|
@@ -205,7 +204,9 @@ class PyISPyBClient(HardwareObject):
|
|
|
205
204
|
)
|
|
206
205
|
ssx_data_collection_create = {
|
|
207
206
|
"dataCollectionGroupId": dcg_id,
|
|
208
|
-
"exposureTime":
|
|
207
|
+
"exposureTime": (
|
|
208
|
+
collection_parameters.user_collection_parameters.exp_time
|
|
209
|
+
),
|
|
209
210
|
"transmission": beamline_parameters.transmission,
|
|
210
211
|
"flux": extra_lims_values.flux_start,
|
|
211
212
|
"xBeam": beamline_parameters.beam_x,
|
|
@@ -221,7 +222,9 @@ class PyISPyBClient(HardwareObject):
|
|
|
221
222
|
"xtalSnapshotFullPath4": "",
|
|
222
223
|
"imagePrefix": collection_parameters.path_parameters.prefix,
|
|
223
224
|
"numberOfPasses": 1,
|
|
224
|
-
"numberOfImages":
|
|
225
|
+
"numberOfImages": (
|
|
226
|
+
collection_parameters.collection_parameters.num_images
|
|
227
|
+
),
|
|
225
228
|
"resolution": beamline_parameters.resolution,
|
|
226
229
|
"resolutionAtCorner": 0.0,
|
|
227
230
|
"flux_end": extra_lims_values.flux_end,
|
|
@@ -296,4 +299,4 @@ class PyISPyBClient(HardwareObject):
|
|
|
296
299
|
extra_lims_values,
|
|
297
300
|
)
|
|
298
301
|
except Exception:
|
|
299
|
-
|
|
302
|
+
self.log.exception("")
|
|
@@ -466,7 +466,7 @@ class GraphicsItemPoint(GraphicsItem):
|
|
|
466
466
|
self.__centred_position.kappa_phi,
|
|
467
467
|
)
|
|
468
468
|
except Exception:
|
|
469
|
-
|
|
469
|
+
self.log.exception("")
|
|
470
470
|
return full_name
|
|
471
471
|
|
|
472
472
|
def get_centred_position(self):
|
|
@@ -602,7 +602,7 @@ class GraphicsItemLine(GraphicsItem):
|
|
|
602
602
|
start_cpos.kappa_phi,
|
|
603
603
|
)
|
|
604
604
|
except Exception:
|
|
605
|
-
|
|
605
|
+
self.log.exception("")
|
|
606
606
|
return full_name
|
|
607
607
|
|
|
608
608
|
def paint(self, painter, option, widget):
|
|
@@ -258,9 +258,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
258
258
|
self.diffractometer_phase_changed,
|
|
259
259
|
)
|
|
260
260
|
else:
|
|
261
|
-
|
|
262
|
-
"GraphicsManager: Diffractometer hwobj not defined"
|
|
263
|
-
)
|
|
261
|
+
self.log.error("GraphicsManager: Diffractometer hwobj not defined")
|
|
264
262
|
|
|
265
263
|
if HWR.beamline.beam is not None:
|
|
266
264
|
self.beam_info_dict = HWR.beamline.beam.get_beam_info_dict()
|
|
@@ -273,9 +271,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
273
271
|
self.beam_info_changed(self.beam_info_dict)
|
|
274
272
|
self.beam_position_changed(HWR.beamline.beam.get_beam_position_on_screen())
|
|
275
273
|
else:
|
|
276
|
-
|
|
277
|
-
"GraphicsManager: BeamInfo hwobj not defined"
|
|
278
|
-
)
|
|
274
|
+
self.log.error("GraphicsManager: BeamInfo hwobj not defined")
|
|
279
275
|
|
|
280
276
|
self.camera_hwobj = self.get_object_by_role(
|
|
281
277
|
self.get_property("camera_name", "camera")
|
|
@@ -286,7 +282,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
286
282
|
self.camera_hwobj.start_camera()
|
|
287
283
|
self.connect(self.camera_hwobj, "imageReceived", self.camera_image_received)
|
|
288
284
|
else:
|
|
289
|
-
|
|
285
|
+
self.log.error("GraphicsManager: Camera hwobj not defined")
|
|
290
286
|
|
|
291
287
|
try:
|
|
292
288
|
self.image_scale_list = eval(self.get_property("image_scale_list", "[]"))
|
|
@@ -294,7 +290,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
294
290
|
self.image_scale = self.get_property("default_image_scale")
|
|
295
291
|
self.set_image_scale(self.image_scale, self.image_scale is not None)
|
|
296
292
|
except Exception:
|
|
297
|
-
|
|
293
|
+
self.log.exception("")
|
|
298
294
|
|
|
299
295
|
"""
|
|
300
296
|
if self.get_property("store_graphics_config") == True:
|
|
@@ -335,7 +331,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
335
331
|
eval(self.get_property("magnification_tool"))
|
|
336
332
|
)
|
|
337
333
|
except Exception:
|
|
338
|
-
|
|
334
|
+
self.log.exception("")
|
|
339
335
|
|
|
340
336
|
# try:
|
|
341
337
|
# self.set_view_scale(self.get_property("view_scale"))
|
|
@@ -482,7 +478,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
482
478
|
if self.graphics_config_filename is None:
|
|
483
479
|
return
|
|
484
480
|
|
|
485
|
-
|
|
481
|
+
self.log.debug("GraphicsManager: Saving graphics " + \
|
|
486
482
|
"in configuration file %s" % self.graphics_config_filename)
|
|
487
483
|
try:
|
|
488
484
|
if not os.path.exists(os.path.dirname(self.graphics_config_filename)):
|
|
@@ -508,7 +504,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
508
504
|
graphics_config_file.write(repr(graphics_config))
|
|
509
505
|
graphics_config_file.close()
|
|
510
506
|
except:
|
|
511
|
-
|
|
507
|
+
self.log.error("GraphicsManager: Error saving graphics " + \
|
|
512
508
|
"in configuration file %s" % self.graphics_config_filename)
|
|
513
509
|
"""
|
|
514
510
|
|
|
@@ -516,7 +512,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
516
512
|
"""Loads graphics from file"""
|
|
517
513
|
if os.path.exists(self.graphics_config_filename):
|
|
518
514
|
try:
|
|
519
|
-
|
|
515
|
+
self.log.debug(
|
|
520
516
|
"GraphicsManager: Loading graphics "
|
|
521
517
|
+ "from configuration file %s" % self.graphics_config_filename
|
|
522
518
|
)
|
|
@@ -542,7 +538,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
542
538
|
self.de_select_all()
|
|
543
539
|
graphics_config_file.close()
|
|
544
540
|
except Exception:
|
|
545
|
-
|
|
541
|
+
self.log.error(
|
|
546
542
|
"GraphicsManager: Unable to load "
|
|
547
543
|
+ "graphics from configuration file %s"
|
|
548
544
|
% self.graphics_config_filename
|
|
@@ -797,7 +793,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
797
793
|
date_time_str = datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
|
|
798
794
|
result_image.save("/opt/embl-hh/var/crystal_images/%s.png" % date_time_str)
|
|
799
795
|
except Exception:
|
|
800
|
-
|
|
796
|
+
self.log.exception("")
|
|
801
797
|
|
|
802
798
|
def diffractometer_centring_failed(self, method, centring_status):
|
|
803
799
|
"""CleanUp method after centring failed
|
|
@@ -1434,7 +1430,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
1434
1430
|
:param file_name: file name
|
|
1435
1431
|
:type file_name: str
|
|
1436
1432
|
"""
|
|
1437
|
-
|
|
1433
|
+
self.log.debug("Saving scene snapshot: %s" % filename)
|
|
1438
1434
|
try:
|
|
1439
1435
|
if not os.path.exists(os.path.dirname(filename)):
|
|
1440
1436
|
os.makedirs(os.path.dirname(filename))
|
|
@@ -1504,9 +1500,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
1504
1500
|
else:
|
|
1505
1501
|
self.camera_hwobj.save_snapshot(filename, "PNG")
|
|
1506
1502
|
except Exception:
|
|
1507
|
-
|
|
1508
|
-
"Unable to save snapshot in %s" % filename
|
|
1509
|
-
)
|
|
1503
|
+
self.log.exception("Unable to save snapshot in %s" % filename)
|
|
1510
1504
|
|
|
1511
1505
|
def save_beam_profile(self, profile_filename):
|
|
1512
1506
|
image_array = self.get_raw_snapshot(bw=True, return_as_array=True)
|
|
@@ -1521,7 +1515,7 @@ class QtGraphicsManager(AbstractSampleView):
|
|
|
1521
1515
|
|
|
1522
1516
|
fig.savefig(profile_filename, dpi=300, bbox_inches="tight")
|
|
1523
1517
|
except Exception:
|
|
1524
|
-
|
|
1518
|
+
self.log.exception(
|
|
1525
1519
|
"Unable to save beam profile image: %s" % profile_filename
|
|
1526
1520
|
)
|
|
1527
1521
|
|
|
@@ -58,9 +58,7 @@ class QtInstanceServer(Procedure):
|
|
|
58
58
|
|
|
59
59
|
# Check the HO configuration
|
|
60
60
|
if self.serverPort is None:
|
|
61
|
-
|
|
62
|
-
"InstanceServer: you must specify a port number"
|
|
63
|
-
)
|
|
61
|
+
self.log.error("InstanceServer: you must specify a port number")
|
|
64
62
|
else:
|
|
65
63
|
pass
|
|
66
64
|
|
|
@@ -117,7 +115,7 @@ class QtInstanceServer(Procedure):
|
|
|
117
115
|
elif self.isClient():
|
|
118
116
|
my_nick = self.clientId2[0]
|
|
119
117
|
else:
|
|
120
|
-
|
|
118
|
+
self.log.warning(
|
|
121
119
|
"InstanceServer: printing an id while not server nor client"
|
|
122
120
|
)
|
|
123
121
|
|
|
@@ -142,7 +140,7 @@ class QtInstanceServer(Procedure):
|
|
|
142
140
|
# Starts the server
|
|
143
141
|
def startServer(self):
|
|
144
142
|
if self.asyncServer is not None:
|
|
145
|
-
|
|
143
|
+
self.log.error("InstanceServer: server already started")
|
|
146
144
|
elif self.serverPort is not None:
|
|
147
145
|
try:
|
|
148
146
|
async_server = gevent.server.StreamServer(
|
|
@@ -150,14 +148,14 @@ class QtInstanceServer(Procedure):
|
|
|
150
148
|
) # AsyncServer(self,self.serverHost,self.serverPort)
|
|
151
149
|
async_server.start()
|
|
152
150
|
except Exception:
|
|
153
|
-
|
|
151
|
+
self.log.warning(
|
|
154
152
|
"InstanceServer: cannot create server, so trying to connect to it"
|
|
155
153
|
)
|
|
156
154
|
self.connectToServer()
|
|
157
155
|
else:
|
|
158
156
|
self.asyncServer = async_server
|
|
159
157
|
server_hostname = self.serverHost.split(".")[0]
|
|
160
|
-
|
|
158
|
+
self.log.debug(
|
|
161
159
|
"InstanceServer: listening to connections on %s:%d"
|
|
162
160
|
% (server_hostname, self.serverPort)
|
|
163
161
|
)
|
|
@@ -169,7 +167,7 @@ class QtInstanceServer(Procedure):
|
|
|
169
167
|
|
|
170
168
|
self.emit("serverInitialized", (True, self.serverId2))
|
|
171
169
|
else:
|
|
172
|
-
|
|
170
|
+
self.log.error(
|
|
173
171
|
"InstanceServer: not property configured to start the server"
|
|
174
172
|
)
|
|
175
173
|
self.emit("serverInitialized", (False,))
|
|
@@ -190,9 +188,7 @@ class QtInstanceServer(Procedure):
|
|
|
190
188
|
except Exception:
|
|
191
189
|
self.instanceClient = None
|
|
192
190
|
if not quiet:
|
|
193
|
-
|
|
194
|
-
"InstanceServer: cannot connect to server"
|
|
195
|
-
)
|
|
191
|
+
self.log.error("InstanceServer: cannot connect to server")
|
|
196
192
|
self.emit("clientInitialized", (False, (None, None), None, quiet))
|
|
197
193
|
else:
|
|
198
194
|
my_login = pwd.getpwuid(os.getuid())[0]
|
|
@@ -223,9 +219,7 @@ class QtInstanceServer(Procedure):
|
|
|
223
219
|
return self.controlId2
|
|
224
220
|
|
|
225
221
|
def serverClosed(self):
|
|
226
|
-
|
|
227
|
-
"InstanceServer: server has closed the connection!"
|
|
228
|
-
)
|
|
222
|
+
self.log.error("InstanceServer: server has closed the connection!")
|
|
229
223
|
self.emit("serverClosed", (self.serverId2,))
|
|
230
224
|
|
|
231
225
|
def clientConnected(self, addr, req_handler):
|
|
@@ -300,7 +294,7 @@ class QtInstanceServer(Procedure):
|
|
|
300
294
|
data = msg.encode()
|
|
301
295
|
send_data_to_server(self.instanceClient, data)
|
|
302
296
|
else:
|
|
303
|
-
|
|
297
|
+
self.log.warning(
|
|
304
298
|
"InstanceServer: requestIdChange while not server nor client!"
|
|
305
299
|
)
|
|
306
300
|
|
|
@@ -318,7 +312,7 @@ class QtInstanceServer(Procedure):
|
|
|
318
312
|
send_data_to_server(self.instanceClient, data)
|
|
319
313
|
my_id = self.clientId2
|
|
320
314
|
else:
|
|
321
|
-
|
|
315
|
+
self.log.warning(
|
|
322
316
|
"InstanceServer: sendChatMessage while not server nor client!"
|
|
323
317
|
)
|
|
324
318
|
self.emit("chatMessageReceived", (priority, my_id, message))
|
|
@@ -344,7 +338,7 @@ class QtInstanceServer(Procedure):
|
|
|
344
338
|
elif self.isClient():
|
|
345
339
|
send_data_to_server(self.instanceClient, data)
|
|
346
340
|
else:
|
|
347
|
-
|
|
341
|
+
self.log.warning(
|
|
348
342
|
"InstanceServer: sendBrickUpdateMessage while not server nor client!"
|
|
349
343
|
)
|
|
350
344
|
|
|
@@ -358,7 +352,7 @@ class QtInstanceServer(Procedure):
|
|
|
358
352
|
elif self.isClient():
|
|
359
353
|
send_data_to_server(self.instanceClient, data)
|
|
360
354
|
else:
|
|
361
|
-
|
|
355
|
+
self.log.warning(
|
|
362
356
|
"InstanceServer: sendTabUpdateMessage while not server nor client!"
|
|
363
357
|
)
|
|
364
358
|
|
|
@@ -393,9 +387,7 @@ class QtInstanceServer(Procedure):
|
|
|
393
387
|
data = msg.encode()
|
|
394
388
|
send_data_to_server(self.instanceClient, data)
|
|
395
389
|
else:
|
|
396
|
-
|
|
397
|
-
"InstanceServer: giveControl while not server nor client!"
|
|
398
|
-
)
|
|
390
|
+
self.log.warning("InstanceServer: giveControl while not server nor client!")
|
|
399
391
|
|
|
400
392
|
def askForControl(self):
|
|
401
393
|
msg = AskControlInstanceMessage()
|
|
@@ -427,7 +419,7 @@ class QtInstanceServer(Procedure):
|
|
|
427
419
|
|
|
428
420
|
self.emit("haveControl", (True,))
|
|
429
421
|
else:
|
|
430
|
-
|
|
422
|
+
self.log.warning(
|
|
431
423
|
"InstanceServer: takeControl while already in control!"
|
|
432
424
|
)
|
|
433
425
|
|
|
@@ -437,7 +429,7 @@ class QtInstanceServer(Procedure):
|
|
|
437
429
|
data = msg.encode()
|
|
438
430
|
send_data_to_server(self.instanceClient, data)
|
|
439
431
|
else:
|
|
440
|
-
|
|
432
|
+
self.log.warning(
|
|
441
433
|
"InstanceServer: takeControl while already in control!"
|
|
442
434
|
)
|
|
443
435
|
|
|
@@ -452,13 +444,11 @@ class QtInstanceServer(Procedure):
|
|
|
452
444
|
client_addr = self.clients[self.controlId2[0]][0]
|
|
453
445
|
send_data_to_client(client_addr, data)
|
|
454
446
|
else:
|
|
455
|
-
|
|
447
|
+
self.log.warning(
|
|
456
448
|
"InstanceServer: calling a brick while having control!"
|
|
457
449
|
)
|
|
458
450
|
else:
|
|
459
|
-
|
|
460
|
-
"InstanceServer: only the server can call a brick!"
|
|
461
|
-
)
|
|
451
|
+
self.log.warning("InstanceServer: only the server can call a brick!")
|
|
462
452
|
|
|
463
453
|
def answerToServer(self, brick, method, method_args):
|
|
464
454
|
msg = BrickCallInstanceMessage()
|
|
@@ -467,9 +457,7 @@ class QtInstanceServer(Procedure):
|
|
|
467
457
|
msg.setBrickUpdate(brick_name, widget_name, method, method_args)
|
|
468
458
|
data = msg.encode()
|
|
469
459
|
if self.isServer():
|
|
470
|
-
|
|
471
|
-
"InstanceServer: only a client can answer to the server!"
|
|
472
|
-
)
|
|
460
|
+
self.log.warning("InstanceServer: only a client can answer to the server!")
|
|
473
461
|
else:
|
|
474
462
|
data = msg.encode()
|
|
475
463
|
send_data_to_server(self.instanceClient, data)
|
|
@@ -480,16 +468,12 @@ class QtInstanceServer(Procedure):
|
|
|
480
468
|
try:
|
|
481
469
|
message = InstanceMessage(data=data)
|
|
482
470
|
except Exception:
|
|
483
|
-
|
|
484
|
-
"InstanceServer: problem parsing received message"
|
|
485
|
-
)
|
|
471
|
+
self.log.exception("InstanceServer: problem parsing received message")
|
|
486
472
|
else:
|
|
487
473
|
try:
|
|
488
474
|
t = message.getType()
|
|
489
475
|
except Exception:
|
|
490
|
-
|
|
491
|
-
"InstanceServer: problem parsing received message"
|
|
492
|
-
)
|
|
476
|
+
self.log.exception("InstanceServer: problem parsing received message")
|
|
493
477
|
else:
|
|
494
478
|
if t == InstanceMessage.TYPE_CHAT:
|
|
495
479
|
msg_obj = ChatInstanceMessage(message)
|
|
@@ -514,7 +498,7 @@ class QtInstanceServer(Procedure):
|
|
|
514
498
|
elif t == InstanceMessage.TYPE_BRICKCALL:
|
|
515
499
|
msg_obj = BrickCallInstanceMessage(message)
|
|
516
500
|
else:
|
|
517
|
-
|
|
501
|
+
self.log.warning(
|
|
518
502
|
"InstanceServer: unknown message type %s " % str(t)
|
|
519
503
|
)
|
|
520
504
|
return msg_obj
|
|
@@ -607,9 +591,7 @@ class QtInstanceServer(Procedure):
|
|
|
607
591
|
exec("method=brick.%s.%s" % (widget_name, widget_method))
|
|
608
592
|
self.emit("widgetCall", (timestamp, method, widget_method_args))
|
|
609
593
|
except Exception:
|
|
610
|
-
|
|
611
|
-
"InstanceServer: problem while calling a brick!"
|
|
612
|
-
)
|
|
594
|
+
self.log.exception("InstanceServer: problem while calling a brick!")
|
|
613
595
|
|
|
614
596
|
elif isinstance(m, BrickUpdateInstanceMessage):
|
|
615
597
|
try:
|
|
@@ -631,9 +613,7 @@ class QtInstanceServer(Procedure):
|
|
|
631
613
|
"widgetUpdate", (timestamp, method, widget_method_args, masterSync)
|
|
632
614
|
)
|
|
633
615
|
except Exception:
|
|
634
|
-
|
|
635
|
-
"InstanceServer: problem while updating a brick!"
|
|
636
|
-
)
|
|
616
|
+
self.log.exception("InstanceServer: problem while updating a brick!")
|
|
637
617
|
|
|
638
618
|
elif isinstance(m, TabUpdateInstanceMessage):
|
|
639
619
|
try:
|
|
@@ -646,9 +626,7 @@ class QtInstanceServer(Procedure):
|
|
|
646
626
|
method_args = (tab_index,)
|
|
647
627
|
self.emit("widgetUpdate", (timestamp, method, method_args))
|
|
648
628
|
except Exception:
|
|
649
|
-
|
|
650
|
-
"InstanceServer: problem while updating a tab!"
|
|
651
|
-
)
|
|
629
|
+
self.log.exception("InstanceServer: problem while updating a tab!")
|
|
652
630
|
|
|
653
631
|
def serverMessageReceived(self, client_addr, data):
|
|
654
632
|
m = self.parseReceivedMessage(data)
|
|
@@ -855,9 +833,7 @@ class QtInstanceServer(Procedure):
|
|
|
855
833
|
exec("method=brick.%s.%s" % (widget_name, widget_method))
|
|
856
834
|
self.emit("widgetCall", (timestamp, method, widget_method_args))
|
|
857
835
|
except Exception:
|
|
858
|
-
|
|
859
|
-
"InstanceServer: problem while calling a brick!"
|
|
860
|
-
)
|
|
836
|
+
self.log.exception("InstanceServer: problem while calling a brick!")
|
|
861
837
|
|
|
862
838
|
elif isinstance(m, BrickUpdateInstanceMessage):
|
|
863
839
|
broadcast_to_clients(data, avoid=(client_addr,))
|
|
@@ -878,9 +854,7 @@ class QtInstanceServer(Procedure):
|
|
|
878
854
|
"widgetUpdate", (timestamp, method, widget_method_args, masterSync)
|
|
879
855
|
)
|
|
880
856
|
except Exception:
|
|
881
|
-
|
|
882
|
-
"InstanceServer: problem while updating a brick!"
|
|
883
|
-
)
|
|
857
|
+
self.log.exception("InstanceServer: problem while updating a brick!")
|
|
884
858
|
|
|
885
859
|
elif isinstance(m, TabUpdateInstanceMessage):
|
|
886
860
|
broadcast_to_clients(data, avoid=(client_addr,))
|
|
@@ -895,9 +869,7 @@ class QtInstanceServer(Procedure):
|
|
|
895
869
|
method_args = (tab_index,)
|
|
896
870
|
self.emit("widgetUpdate", (timestamp, method, method_args))
|
|
897
871
|
except Exception:
|
|
898
|
-
|
|
899
|
-
"InstanceServer: problem while updating a tab!"
|
|
900
|
-
)
|
|
872
|
+
self.log.exception("InstanceServer: problem while updating a tab!")
|
|
901
873
|
|
|
902
874
|
elif isinstance(m, TakeControlInstanceMessage):
|
|
903
875
|
found_id = None
|
|
@@ -44,8 +44,6 @@ Example Hardware Object XML file :
|
|
|
44
44
|
</object>
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
|
-
import logging
|
|
48
|
-
|
|
49
47
|
from mxcubecore.HardwareObjects.abstract.AbstractVideoDevice import AbstractVideoDevice
|
|
50
48
|
|
|
51
49
|
try:
|
|
@@ -92,9 +90,7 @@ class QtLimaVideo(AbstractVideoDevice):
|
|
|
92
90
|
self.camera = Prosilica.Camera(self.cam_address, self.master_mode, False)
|
|
93
91
|
self.interface = Prosilica.Interface(self.camera)
|
|
94
92
|
elif self.cam_type == "basler":
|
|
95
|
-
|
|
96
|
-
"Connecting to camera with address %s" % self.cam_address
|
|
97
|
-
)
|
|
93
|
+
self.log.info("Connecting to camera with address %s" % self.cam_address)
|
|
98
94
|
self.camera = Basler.Camera(self.cam_address)
|
|
99
95
|
self.interface = Basler.Interface(self.camera)
|
|
100
96
|
|
|
@@ -168,7 +168,7 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
168
168
|
qe.handle_exception(ex)
|
|
169
169
|
self.stop()
|
|
170
170
|
except gevent.GreenletExit:
|
|
171
|
-
|
|
171
|
+
self.log.exception("")
|
|
172
172
|
|
|
173
173
|
if isinstance(ex, base_queue_entry.QueueAbortedException):
|
|
174
174
|
logging.getLogger("user_level_log").warning(
|
|
@@ -222,7 +222,7 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
222
222
|
self.emit("queue_entry_execute_finished", (entry, "Successful"))
|
|
223
223
|
self.emit("statusMessage", ("status", "", "ready"))
|
|
224
224
|
except base_queue_entry.QueueSkipEntryException as ex:
|
|
225
|
-
|
|
225
|
+
self.log.warning(
|
|
226
226
|
"encountered Exception (continuing):\n%s" % ex.stack_trace or ex.message
|
|
227
227
|
)
|
|
228
228
|
# Queue entry, failed, skip.
|
|
@@ -234,7 +234,7 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
234
234
|
# Definitely not good state, but call post_execute
|
|
235
235
|
# anyway, there might be code that cleans up things
|
|
236
236
|
# done in _pre_execute or before the exception in _execute.
|
|
237
|
-
|
|
237
|
+
self.log.warning(
|
|
238
238
|
"encountered Exception (continuing):\n%s" % ex.stack_trace or ex.message
|
|
239
239
|
)
|
|
240
240
|
entry.status = QUEUE_ENTRY_STATUS.FAILED
|
|
@@ -243,16 +243,14 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
243
243
|
entry.handle_exception(ex)
|
|
244
244
|
raise ex
|
|
245
245
|
except base_queue_entry.QueueExecutionException as ex:
|
|
246
|
-
|
|
246
|
+
self.log.warning(
|
|
247
247
|
"encountered Exception (continuing):\n%s" % ex.stack_trace or ex.message
|
|
248
248
|
)
|
|
249
249
|
entry.status = QUEUE_ENTRY_STATUS.FAILED
|
|
250
250
|
self.emit("queue_entry_execute_finished", (entry, "Failed"))
|
|
251
251
|
self.emit("statusMessage", ("status", "Queue execution failed", "error"))
|
|
252
252
|
except:
|
|
253
|
-
|
|
254
|
-
"encountered Exception:\n%s" % traceback.format_exc()
|
|
255
|
-
)
|
|
253
|
+
self.log.warning("encountered Exception:\n%s" % traceback.format_exc())
|
|
256
254
|
raise
|
|
257
255
|
else:
|
|
258
256
|
entry.post_execute()
|
|
@@ -276,9 +274,9 @@ class QueueManager(HardwareObject, QueueEntryContainer):
|
|
|
276
274
|
qe.stop()
|
|
277
275
|
qe.post_execute()
|
|
278
276
|
except base_queue_entry.QueueAbortedException:
|
|
279
|
-
|
|
277
|
+
self.log.exception("")
|
|
280
278
|
except Exception:
|
|
281
|
-
|
|
279
|
+
self.log.exception("")
|
|
282
280
|
|
|
283
281
|
if self._root_task:
|
|
284
282
|
self._root_task.kill(block=False)
|
|
@@ -503,9 +503,9 @@ class QueueModel(HardwareObject):
|
|
|
503
503
|
)
|
|
504
504
|
for child in task_group_entry.get_children():
|
|
505
505
|
child.set_snapshot(snapshot)
|
|
506
|
-
|
|
506
|
+
self.log.info("Queue loading done")
|
|
507
507
|
except Exception:
|
|
508
|
-
|
|
508
|
+
self.log.exception("Unable to load queue")
|
|
509
509
|
|
|
510
510
|
def load_queue_from_file(self, filename, snapshot=None):
|
|
511
511
|
"""Loads queue from file. The problem is snapshots that are
|
|
@@ -515,7 +515,7 @@ class QueueModel(HardwareObject):
|
|
|
515
515
|
:returns: model name 'free-pin', 'ispyb' or 'plate'
|
|
516
516
|
"""
|
|
517
517
|
|
|
518
|
-
|
|
518
|
+
self.log.info("Loading queue from file %s" % filename)
|
|
519
519
|
load_file = None
|
|
520
520
|
try:
|
|
521
521
|
# Read file and clear the model
|
|
@@ -545,13 +545,11 @@ class QueueModel(HardwareObject):
|
|
|
545
545
|
)
|
|
546
546
|
for child in task_group_entry.get_children():
|
|
547
547
|
child.set_snapshot(snapshot)
|
|
548
|
-
|
|
548
|
+
self.log.info("Queue loading done")
|
|
549
549
|
else:
|
|
550
|
-
|
|
550
|
+
self.log.info("No queue content available in file")
|
|
551
551
|
return decoded_file[0]
|
|
552
552
|
except Exception:
|
|
553
|
-
|
|
554
|
-
"Unable to load queue " + "from file %s", filename
|
|
555
|
-
)
|
|
553
|
+
self.log.exception("Unable to load queue " + "from file %s", filename)
|
|
556
554
|
if load_file:
|
|
557
555
|
load_file.close()
|