File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ def run(
2121 logger .error ("Unable to find transport manager" )
2222 return {"success" : False , "requeue" : False }
2323
24+ logger .info (f"Registering the following data collection group: \n { message } " )
25+
2426 ispyb_session_id = get_session_id (
2527 microscope = message ["microscope" ],
2628 proposal_code = message ["proposal_code" ],
@@ -58,9 +60,9 @@ def run(
5860 cassetteSlot = message .get ("sample" ),
5961 )
6062 if _transport_object :
61- atlas_id = _transport_object .do_insert_atlas (atlas_record )[
62- "return_value"
63- ]
63+ atlas_id = _transport_object .do_insert_atlas (atlas_record ). get (
64+ "return_value" , None
65+ )
6466 else :
6567 atlas_id = None
6668 murfey_dcg = MurfeyDB .DataCollectionGroup (
@@ -77,6 +79,11 @@ def run(
7779 murfey_db .close ()
7880 if dcgid is None :
7981 time .sleep (2 )
82+ logger .error (
83+ "Failed to register the following data collection group: \n "
84+ f"{ message } \n "
85+ "Requeuing message"
86+ )
8087 return {"success" : False , "requeue" : True }
8188 if dcg_hooks := entry_points ().select (
8289 group = "murfey.hooks" , name = "data_collection_group"
You can’t perform that action at this time.
0 commit comments