In my code when a process starts the following data are stored in my core_pid table.
db.core_pid.insert({"blog_id": blog["_id"], "proid": str(p.pid), "starttime": datetime.now(pytz.timezone('EST')), "status": "Running", "route":routing})
After the process is completed i updated the value of status using the below code.
db.core_pid.update({"_id": current_id},
{"$set": {"status": "Completed"}})
Now i want to include a new field endtime in database when process is completed ({"endtime": datetime.now(pytz.timezone('EST'))}).How can i alter the above update code to include this endtime field too.