diff --git a/devices/toolkit/archiver.py b/devices/toolkit/archiver.py index fe3b1f87dcf43450331056da59403c823f10d742..aa67d66a1da78ca2d9420f52d9dd97816ff9d6a9 100644 --- a/devices/toolkit/archiver.py +++ b/devices/toolkit/archiver.py @@ -216,7 +216,7 @@ class Archiver(): if use_freq: return str(es.AttributeRecordFreq)+(' events/period' ) else: - return len(es.AttributeList) + return len(es.AttributeList or []) class AttributeFormatException(Exception): """ diff --git a/jupyter-notebooks/PCC_archive_attribute.ipynb b/jupyter-notebooks/PCC_archive_attribute.ipynb index d2e413b686a08b4877c935be3a79bc0a2033b38a..46ce0fafc3e4de5695bac0eda6d381330e99bb85 100644 --- a/jupyter-notebooks/PCC_archive_attribute.ipynb +++ b/jupyter-notebooks/PCC_archive_attribute.ipynb @@ -226,24 +226,27 @@ { "cell_type": "code", "execution_count": null, - "id": "a0e8dcab", + "id": "1c753ed9", "metadata": {}, "outputs": [], "source": [ - "# Turn off the device\n", - "d.off()\n", - "# Remove attribute from archiving list\n", - "#archiver.remove_attribute_from_archiver(attr_fq_name)\n", - "#archiver.remove_attributes_by_device(device_name)" + "# Count number of archive events per minute\n", + "archiver.get_subscriber_load()" ] }, { "cell_type": "code", "execution_count": null, - "id": "32ab34a9", + "id": "a0e8dcab", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "# Turn off the device\n", + "d.off()\n", + "# Remove attribute from archiving list\n", + "#archiver.remove_attribute_from_archiver(attr_fq_name)\n", + "#archiver.remove_attributes_by_device(device_name)" + ] } ], "metadata": {