Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def mark_entry_being_calculated(self, key):
self.mongo_collection.update_one(
filter={
'func': _MongoCore._get_func_str(self.func),
'key': key
},
update={
'$set': {'being_calculated': True}
},
upsert=True
)