Closed (fixed)
Project:
Weather
Version:
6.x-5.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
24 Apr 2012 at 12:52 UTC
Updated:
30 May 2012 at 20:40 UTC
Watchdog had the following error in it this morning:
Download location for METAR data is not accessible.
This occurred at 05:57 server time. I have cron configured to run and update the weather data hourly, so it ran again at 7:00 and 8:00, and then for good measure I ran it once more manually a few minutes ago. The weather data was not updated. The only way to force an update is to delete the row with the old data from the database, which forces the module to rebuild it on the next page load in which the block is displayed.
Comments
Comment #1
toddy commentedHi,
if the download location is not available, the module will check again after 10 minutes. If the data still cannot be downloaded, the next check occurs after 3 hours, then 6, 12, and 24 hours after the initial download attempt. From then on, the module tries once a day to download the weather data. You don't need to manually delete the row. Judging from the times you've mentioned above, you've probably just missed the three-hour-check. Could that be the explanation?
Regards,
Tobias
Comment #2
macman824 commentedHi toddy,
To test your suggestion, I let the module sit with outdated data for three days -- it never changed in that time (and the METAR data was quite accessible; as soon as I deleted the row it repopulated with the current METAR). Since this doesn't appear to match up with your design intent, I've gone ahead and re-opened the issue. I feel like the problem might be here on line 2073-2075 of weather.module:
$last_update is set to the raw METAR data, which is a string. That string then has arithmetic performed on it as if it was a timestamp, but it's not. I suggest the following change:
Comment #3
toddy commentedYou're right, thanks for checking that again. I'll prepare a fix.
Comment #4
toddy commentedHi,
this should be fixed in the latest release, 6.x-5.20.