Revize 127a92b1
Přidáno uživatelem Eliška Mourycová před téměř 4 roky(ů)
Server/ServerApp/DataDownload/DataDownloader.cs | ||
---|---|---|
90 | 90 |
CreateSubdirectories(); // todo should we do it like this? |
91 | 91 |
|
92 | 92 |
webClient = new WebClient(); |
93 |
|
|
94 |
logger.Info("Data downlader ready."); |
|
93 | 95 |
} |
94 | 96 |
|
95 | 97 |
/// <summary> |
... | ... | |
114 | 116 |
// this shouldn't happen |
115 | 117 |
//Console.WriteLine("Weather prediction download failed!"); |
116 | 118 |
logger.Error("Weather prediction download failed!"); |
119 |
logger.Error(e.Message); |
|
117 | 120 |
return null; |
118 | 121 |
} |
119 | 122 |
|
... | ... | |
280 | 283 |
try |
281 | 284 |
{ |
282 | 285 |
//Console.WriteLine("Downloading .zip to " + Path.GetFullPath(nameZip) + "..."); |
286 |
logger.Info("Trying to download " + url); |
|
283 | 287 |
|
284 | 288 |
// Download the zip file: |
285 | 289 |
webClient.DownloadFile(url, nameZip); |
... | ... | |
332 | 336 |
catch(System.Net.WebException we) |
333 | 337 |
{ |
334 | 338 |
// download fails, if the specified url is invalid |
335 |
//Console.WriteLine("Download from " + url + " failed."); |
|
336 |
//Console.WriteLine(we.Message); |
|
339 |
logger.Info("Download of " + url + " was not succesful. That is no problem if the given time span does not contain respective open data."); |
|
340 |
logger.Info(we.Message); |
|
341 |
|
|
337 | 342 |
} |
338 | 343 |
|
339 | 344 |
|
... | ... | |
404 | 409 |
return savedFiles; |
405 | 410 |
} |
406 | 411 |
|
407 |
public bool CheckForNewData() |
|
408 |
{ |
|
409 |
throw new NotImplementedException(); |
|
410 |
} |
|
411 |
|
|
412 | 412 |
|
413 | 413 |
/// <summary> |
414 | 414 |
/// Retrieves all data files with dates falling within the specified range. If not all data for the specified range is found |
Také k dispozici: Unified diff
Cosmetic changes, documentation adding, warnings fixing.