added validated_at field
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import logging
|
||||
import time
|
||||
|
||||
from pymongo import MongoClient
|
||||
|
||||
@@ -185,7 +186,9 @@ class MongoDbManager:
|
||||
id = link.split("/")[-1]
|
||||
collection_name = str(datetime.date.today())
|
||||
collection = self.db[collection_name]
|
||||
collection.find_one_and_update({'_id': id}, {"$set": {"url_validated": state}}, upsert=False)
|
||||
validated_at = time.strftime("%H:%M:%S", time.localtime())
|
||||
collection.find_one_and_update({'_id': id}, {"$set": {"url_validated": state, "validated_at": validated_at}},
|
||||
upsert=False)
|
||||
|
||||
|
||||
MONGO_STORE_MANAGER = MongoDbManager()
|
||||
|
||||
Reference in New Issue
Block a user