-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor variable naming #114
base: master
Are you sure you want to change the base?
Changes from 6 commits
e64720a
f8b8b0d
e537b2b
43311fa
36ac751
bf88fcf
e91e842
8142c8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -95,7 +95,7 @@ public void run() { | |||||||||
ZonedDateTime newestDateDownloaded = earliestPossibleModelrun; | ||||||||||
List<FileModel> failedDownloads = | ||||||||||
dbController.execNamedQuery( | ||||||||||
FileModel.FailedDownloads, Collections.singletonList(earliestPossibleModelrun)); | ||||||||||
FileModel.FAILED_DOWNLOADS, Collections.singletonList(earliestPossibleModelrun)); | ||||||||||
for (FileModel file : failedDownloads) { | ||||||||||
ZonedDateTime modelrun = file.getModelrun(); | ||||||||||
if (modelrun.isAfter(newestDateDownloaded)) { | ||||||||||
|
@@ -181,7 +181,7 @@ public boolean download(ZonedDateTime modelrun, Parameter param) { | |||||||||
*/ | ||||||||||
public boolean downloadFile(String folder, FileModel filemodel) { | ||||||||||
boolean success = false; | ||||||||||
if (!filemodel.isSufficient_size() && filemodel.getDownload_fails() < 3) { | ||||||||||
if (!filemodel.isSufficientSize() && filemodel.getDownloadFails() < 3) { | ||||||||||
String url = filemodel.getURL(); | ||||||||||
try { | ||||||||||
if (isUrlReachable(url)) { | ||||||||||
|
@@ -193,15 +193,15 @@ public boolean downloadFile(String folder, FileModel filemodel) { | |||||||||
success = false; | ||||||||||
logger.warn("File " + filemodel.getName() + " is too small (" + file.length() + "B)"); | ||||||||||
} else { | ||||||||||
filemodel.setSufficient_size(true); | ||||||||||
filemodel.setSufficientSize(true); | ||||||||||
filestatusLogger.trace( | ||||||||||
file.getName() + " | ss | sufficient_size = true | Download success"); | ||||||||||
|
||||||||||
filemodel.setDownload_date(ZonedDateTime.now()); | ||||||||||
filemodel.setDownloadDate(ZonedDateTime.now()); | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JavaTimeDefaultTimeZone: ZonedDateTime.now() is not allowed because it silently uses the system default time-zone. You must pass an explicit time-zone (e.g., ZoneId.of("America/Los_Angeles")) to this method. (details)
Suggested change
(at-me in a reply with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JavaTimeDefaultTimeZone: ZonedDateTime.now() is not allowed because it silently uses the system default time-zone. You must pass an explicit time-zone (e.g., ZoneId.of("America/Los_Angeles")) to this method.
Suggested change
(at-me in a reply with Was this a good recommendation? |
||||||||||
filestatusLogger.trace( | ||||||||||
file.getName() + " | dd | Downloadd_date = now | Download success"); | ||||||||||
|
||||||||||
filemodel.setArchivefile_deleted(false); | ||||||||||
filemodel.setArchiveFileDeleted(false); | ||||||||||
filestatusLogger.trace( | ||||||||||
file.getName() + " | adf | archivefile_deleted = false | Download success"); | ||||||||||
success = true; | ||||||||||
|
@@ -213,7 +213,7 @@ public boolean downloadFile(String folder, FileModel filemodel) { | |||||||||
logger.error("Could not download " + filemodel.getName() + " (" + e.getMessage() + ")"); | ||||||||||
} | ||||||||||
if (!success) { | ||||||||||
filemodel.incrementDownload_fails(); | ||||||||||
filemodel.incrementDownloadFails(); | ||||||||||
filestatusLogger.trace( | ||||||||||
filemodel.getName() + " | idf | incremented download_fails | failed Download"); | ||||||||||
} | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JavaTimeDefaultTimeZone: ZonedDateTime.now() is not allowed because it silently uses the system default time-zone. You must pass an explicit time-zone (e.g., ZoneId.of("America/Los_Angeles")) to this method.
(at-me in a reply with
help
orignore
)Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]