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 in status field. there’s a edit_at datetime field, represent the last time the document been edited.

Note

Any value greater or equal than duplicate_flag, AND the edit_at time is smaller update_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)