I have entity in datastore with fields.
created_date = ndb.DateTimeProperty(auto_now_add=True)
epoch = ndb.IntegerProperty()
sent_requests = ndb.JsonProperty()
I would like bulk to delete all those entities which are older than 2 days using daily cron job. I am aware of ndb.delete_multi(list_of_keys)
but how do i get list of keys which are older than 2 days? Is scanning entire datastore with 100+ million entity and getting list of keys where epoch < int(time.time()) - 2*86400
the best option available?