Kazuhiro MIYAHARA 303635348b Refactor expirer's task round robin implementation
Object-expirer changes order of expiration tasks to avoid deleting
objects in a certain container continuously.

To make review for expirer's task queue update patch [1] easy,
this patch refactors the implementation of the order change. In this
patch, the order change is divided as a function.

In [1], there will be two implementations for legacy task queue
and for general task queue. The two implementations have similar
codes. This patch helps to avoid copying codes in the two implementations.

Other than dividing function, this patch tries to resolve:
- Separate container iteration and object iteration to avoid the generator
  termination with (container, None) tuple.
- Using Timestamp class for delete_timestamp to be consist with other modules
- Change yielded delete task object info from tuple to dict because that
  includes several complex info (e.g. task_container, task_object,
  and target_path)
- Fix minor docs and tests depends on the changes above

[1]: https://review.openstack.org/#/c/517389

Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>

Change-Id: Ibf61eb1f767a48cb457dd494e1f7c12acfd205de
2018-02-22 18:43:11 +09:00
..
2017-05-11 01:39:14 -06:00