mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-09-27 15:56:45 +00:00
Store 'last_modified' time info
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io Container Build Test / test-container-build (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built 📦 package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
ChangeDetection.io Container Build Test / test-container-build (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built 📦 package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import uuid
|
||||
from copy import deepcopy
|
||||
import time
|
||||
|
||||
from changedetectionio import strtobool
|
||||
from changedetectionio.notification import default_notification_format_for_watch
|
||||
@@ -34,6 +35,7 @@ schema = {
|
||||
'include_filters': [],
|
||||
'last_checked': 0,
|
||||
'last_error': False,
|
||||
'last_modified': None,
|
||||
'last_viewed': 0, # history key value of the last viewed via the [diff] link
|
||||
'method': 'GET',
|
||||
'notification_alert_count': 0,
|
||||
@@ -152,6 +154,7 @@ class watch_base(dict):
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self.__data[key] = value
|
||||
self.__data['last_modified'] = time.time()
|
||||
|
||||
def __delitem__(self, key):
|
||||
del self.__data[key]
|
||||
@@ -178,6 +181,8 @@ class watch_base(dict):
|
||||
for key in kwargs:
|
||||
self.__data[key] = kwargs[key]
|
||||
|
||||
self.__data['last_modified'] = time.time()
|
||||
|
||||
def items(self):
|
||||
return self.__data.items()
|
||||
|
||||
@@ -195,6 +200,7 @@ class watch_base(dict):
|
||||
|
||||
def clear(self):
|
||||
self.__data.clear()
|
||||
self.__data['last_modified'] = time.time()
|
||||
|
||||
def get_data(self):
|
||||
"""Returns the internal data dictionary"""
|
||||
|
||||
Reference in New Issue
Block a user