Skip to content

Commit

Permalink
Clarify intermediate table name
Browse files Browse the repository at this point in the history
As mentioned in code review, the double downsince name is slightly
confusing, so this renames the intermediate lookup table to something
hopefully more understandable.
  • Loading branch information
lunkwill42 committed May 21, 2024
1 parent d4ea5c1 commit d12fcbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/nav/bin/navclean.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class ArpCloser(RecordCleaner):
def sql(self, expiry):
"""Returns the full UPDATE statement based on the expiry date"""
return f"""
WITH downsince AS (
WITH unreachable_devices AS (
SELECT
netboxid,
start_time AS downsince
Expand All @@ -254,7 +254,7 @@ def sql(self, expiry):
SELECT
netboxid
FROM
downsince
unreachable_devices
WHERE
downsince < {expiry})
AND end_time >= 'infinity'
Expand Down

0 comments on commit d12fcbc

Please sign in to comment.