mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-11 09:48:24 +02:00
Ensure to download and update the database only once a week, even the script will be called by cron each hour. Fixes #12462. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
23 lines
697 B
Diff
23 lines
697 B
Diff
commit 1be0681cc4bcc006369e69d90dc4439eaa6f58d5
|
|
Author: Stefan Schantl <stefan.schantl@ipfire.org>
|
|
Date: Wed Jul 29 18:50:20 2020 +0200
|
|
|
|
location: Provide a return code if the database does not need to be
|
|
updated.
|
|
|
|
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
|
|
|
|
diff --git a/src/python/location.in b/src/python/location.in
|
|
index 5211b28..8cdd140 100644
|
|
--- a/src/python/location.in
|
|
+++ b/src/python/location.in
|
|
@@ -416,7 +416,7 @@ class CLI(object):
|
|
_("The datase has recently be updated recently (%s)") % \
|
|
format_timedelta(now - t),
|
|
)
|
|
- return
|
|
+ return 3
|
|
|
|
# Fetch the timestamp we need from DNS
|
|
t = location.discover_latest_version()
|