can insert timestamp to mongo db
This commit is contained in:
+4
-1
@@ -168,7 +168,9 @@ class MongoDbManager:
|
||||
return link_list
|
||||
|
||||
def link_validated_for_result(self, link: str, linkPojo: LinkPojo, state=True, is_duplicated=False,
|
||||
is_invalid=False, segement_position=1, ua="", model=""):
|
||||
is_invalid=False, segement_position=1, ua="", model="", timestamp_in_s: list = None):
|
||||
if timestamp_in_s is None:
|
||||
timestamp_in_s = []
|
||||
print("link_validated_for_result() called with url = " + link)
|
||||
if is_duplicated:
|
||||
_id = link.split("/")[-2]
|
||||
@@ -194,6 +196,7 @@ class MongoDbManager:
|
||||
"validated_by_model": model,
|
||||
"serial": linkPojo.serial,
|
||||
"validated_by_ua": ua,
|
||||
"timestamp_in_s": "-".join(str(x) for x in timestamp_in_s),
|
||||
"validated_by": validated_by}},
|
||||
upsert=True)
|
||||
# remove the link from db
|
||||
|
||||
Reference in New Issue
Block a user