Skip to content

Commit a14edec

Browse files
committed
do not add most recent strikes
1 parent ff6ec61 commit a14edec

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

blitzortung/cli/imprt2.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,14 @@ def update_strikes(hours=1):
220220
strike.timestamp, strike.x, strike.y)
221221
continue
222222

223-
new_strikes.append(strike)
223+
if strike.timestamp < now - datetime.timedelta(minutes=1):
224+
logger.debug("Strike %s at %s (%.4f, %.4f) new", str(strike_key),
225+
strike.timestamp, strike.x, strike.y)
226+
new_strikes.append(strike)
227+
else:
228+
logger.debug("Strike %s at %s (%.4f, %.4f) too new", str(strike_key),
229+
strike.timestamp, strike.x, strike.y)
230+
224231

225232
logger.info("Found %d new strikes to insert (out of %d from URL)",
226233
len(new_strikes), len(url_strikes))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = 'blitzortung'
3-
version = '1.11.25'
3+
version = '1.11.26'
44
description = 'blitzortung.org python modules'
55
authors = [
66
{name = "Andreas Würl",email = "andi@tryb.de"}

0 commit comments

Comments
 (0)