code: def finished(finished_status,
               update_interval,
               status_key,
               edit_at_key):
      
      return {
          status_key: {"$gte": finished_status},
          edit_at_key: {
              "$gte": x_seconds_before_now(update_interval),
          },
      }
docs: Create dict query for pymongo that getting all finished task.
  
      :param finished_status: int, status code that greater or equal than this
          will be considered as finished.
      :param update_interval: int, the record will be updated every x seconds.
      :param status_key: status code field key, support dot notation.
      :param edit_at_key: edit_at time field key, support dot notation.
  
      :return: dict, a pymongo filter.
  
      **中文文档**
  
      状态码大于某个值, 并且, 更新时间在最近一段时间以内.