Kevin Campbell
unread,May 22, 2012, 11:02:38 AM5/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to total-im...@googlegroups.com
Just a note from our discussion, we are setting the None value on lookup failures, or at least the code is there to do so.
def process_item(self, item):
(success, metrics) = self.process_item_for_provider(item,
self.provider, 'metrics')
ts = str(time.time())
if success:
if metrics:
...
else:
# metrics failed, write None values in for the metric
# values so we don't attempt to reprocess this item
for metric_name in self.provider.metric_names():
if not item.metrics.has_key(metric_name):
item.metrics[metric_name] = {}
item.metrics[metric_name]['values'] = {}
item.metrics[metric_name]['values'][ts] = None
item.metrics[metric_name]['static_meta'] = {} #self.provider
We did have an issue before about None values being recorded as empty objects. If that still exists, I expect it's an issue in the save / to_xml methods on the Item object, which may be converting None values to empty objects when updating an object.
K