Skip to content

Commit 70dba4f

Browse files
committed
Add some more debugs to cfstore
To find source of problem
1 parent bd10dc1 commit 70dba4f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

server/recceiver/cfstore.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def _commitWithThread(self, transaction):
192192
)
193193

194194
_log.info("CF_COMMIT: {transaction}".format(transaction=transaction))
195+
_log.debug("CF_COMMIT: transaction: {s}".format(s=repr(transaction)))
195196
"""
196197
a dictionary with a list of records with their associated property info
197198
pvInfo
@@ -447,7 +448,11 @@ def __updateCF__(
447448
iocTime,
448449
):
449450
_log.info("CF Update IOC: {iocid}".format(iocid=iocid))
450-
451+
_log.debug(
452+
"CF Update IOC: {iocid} recordInfoByName {recordInfoByName}".format(
453+
iocid=iocid, recordInfoByName=recordInfoByName
454+
)
455+
)
451456
# Consider making this function a class methed then 'processor' simply becomes 'self'
452457
client = processor.client
453458
channels_dict = processor.channel_dict
@@ -483,6 +488,7 @@ def __updateCF__(
483488
if (
484489
len(new_channels) == 0 or cf_channel["name"] in records_to_delete
485490
): # case: empty commit/del, remove all reference to ioc
491+
_log.debug("Channel {s} exists in Channelfinder not in new_channels".format(s=cf_channel["name"]))
486492
if cf_channel["name"] in channels_dict:
487493
cf_channel["owner"] = iocs[channels_dict[cf_channel["name"]][-1]]["owner"]
488494
cf_channel["properties"] = __merge_property_lists(
@@ -560,6 +566,11 @@ def __updateCF__(
560566
Channel exists in Channelfinder with same hostname and iocname.
561567
Update the status to ensure it is marked active and update the time.
562568
"""
569+
_log.debug(
570+
"Channel {s} exists in Channelfinder with same hostname and iocname".format(
571+
s=cf_channel["name"]
572+
)
573+
)
563574
cf_channel["properties"] = __merge_property_lists(
564575
[
565576
create_active_property(owner),
@@ -644,7 +655,10 @@ def __updateCF__(
644655
newProps = newProps + recordInfoByName[channel_name]["infoProperties"]
645656

646657
if channel_name in existingChannels:
647-
"""update existing channel: exists but with a different hostName and/or iocName"""
658+
_log.debug(
659+
f"""update existing channel{channel_name}: exists but with a different hostName and/or iocName"""
660+
)
661+
648662
existingChannel = existingChannels[channel_name]
649663
existingChannel["properties"] = __merge_property_lists(newProps, existingChannel)
650664
channels.append(existingChannel)

0 commit comments

Comments
 (0)