scheduler_mongodb_status_flag¶
-
class
pytq.scheduler_mongodb_status_flag.
MongoDBStatusFlagScheduler
(logger=None, collection=None, duplicate_flag=None, update_interval=None)¶ Similar to
MongoDBScheduler
.New Feature:
There’s pre-defined integer -
duplicate_flag
, will be stored instatus
field. there’s aedit_at
datetime field, represent the last time the document been edited.Note
Any value greater or equal than
duplicate_flag
, AND theedit_at
time is smallerupdate_interval
seconds ago, means it is a duplicate item.Parameters: - duplicate_flag – int, represent a status code for finished / duplicate
- update_interval – int, represent need-to-update interval (unit: seconds)