sysview-py 0.4.1__tar.gz → 0.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sysview-py
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: Add your description here
5
5
  Author: Michael Wilson
6
6
  Author-email: Michael Wilson <mw@1wilson.org>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sysview-py"
3
- version = "0.4.1"
3
+ version = "0.4.3"
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -90,7 +90,7 @@ class SysviewDB:
90
90
  self._connection.commit()
91
91
 
92
92
  def get_last_changed_item(self, item):
93
- sql = f"SELECT report_id,raw_item FROM items WHERE command = '{item.command}' AND hostname = '{item.host}' AND NOT status = '{item.status}' ORDER BY rowid DESC LIMIT 1"
93
+ sql = f"SELECT report_id,raw_item FROM items WHERE command = '{item.command}' AND hostname = '{item.host}' AND report_id < {item.report_id} AND NOT status = '{item.status}' ORDER BY rowid DESC LIMIT 1"
94
94
  last_changed_item = self._cursor.execute(sql).fetchone()
95
95
  if last_changed_item is not None:
96
96
  report_id = last_changed_item[0]
@@ -102,6 +102,7 @@ class SysviewDB:
102
102
  self._cursor.execute(sql).fetchone()[0],
103
103
  )
104
104
  last_changed_item.date = report_date
105
+ last_changed_item.host = item.host
105
106
  return last_changed_item
106
107
 
107
108
  def get_item_history(self, item, max_len=10):
File without changes