I guess PR #929 is an entirely different topic.
It seams to me, that the if condition in
weewx.tags.ObservationBinder.has_data is useless, because what happens
afterwards is almost the same in both cases.
May be, the intension for that function was like that really:
@property
def has_data(self):
db_manager = self.db_lookup(self.data_binding)
# First see if the type exists in the database.
if db_manager.exists(self.obs_type):
# Yes. Is it non-null?
val = bool(db_manager.has_data(self.obs_type, self.timespan))
else:
# Nope. Try the xtypes system.
val = weewx.xtypes.has_data(self.obs_type, self.timespan,
db_manager)
return val
See the changed line with yellow background. There could be a connection to
the performance issues some people experience I guess. Unfortunately I
still have no 5.0 installation working to do tests.
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/0cddb249-fefb-4179-84c3-d9fff8e70bc6n%40googlegroups.com.