summaryrefslogtreecommitdiff
path: root/libre/iceweasel/process-json-files.py
diff options
context:
space:
mode:
authorgrizzlyuser <grizzlyuser@protonmail.com>2021-04-21 13:04:13 +0300
committerbill-auger <mr.j.spam.me@gmail.com>2021-05-10 18:17:42 -0400
commita93245e60a120025711d77f64705e99aee01c1c2 (patch)
treee9c91c3044d33da540e4a4f6970ad031a626cde5 /libre/iceweasel/process-json-files.py
parent259f930cbfae7463f10e8c4fc73fa788c8ebd105 (diff)
libre/iceweasel: 88.0 update according to upstream
Diffstat (limited to 'libre/iceweasel/process-json-files.py')
-rw-r--r--libre/iceweasel/process-json-files.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/libre/iceweasel/process-json-files.py b/libre/iceweasel/process-json-files.py
index 69264dc94..ebda48ede 100644
--- a/libre/iceweasel/process-json-files.py
+++ b/libre/iceweasel/process-json-files.py
@@ -69,6 +69,10 @@ class RemoteSettings:
return True
@classmethod
+ def now(cls):
+ return int(round(time.time_ns() / 10 ** 6))
+
+ @classmethod
def process_raw(cls, unwrapped_jsons, parsed_schema):
timestamps, result = [], []
for collection in unwrapped_jsons:
@@ -83,7 +87,7 @@ class RemoteSettings:
record = cls.process_record(record)
if clone != record:
- timestamp = int(round(time.time_ns() / 10 ** 6))
+ timestamp = cls.now()
while timestamp in timestamps:
timestamp += 1
timestamps.append(timestamp)
@@ -111,6 +115,12 @@ class Changes(RemoteSettings):
OUTPUT_PATH = RemoteSettings.DUMPS_PATH_ABSOLUTE / 'monitor/changes.json'
@classmethod
+ def wrap(cls, processed):
+ return File(
+ processed.path, {
+ 'changes': processed.content, 'timestamp': cls.now()})
+
+ @classmethod
def process_raw(cls, unwrapped_jsons, parsed_schema):
changes = []