Add a way to schedule runs for startDelay modulo interval
Summary: Currently, scheduling only allows specifying an interval, not the next run time. This makes it impossible to schedule for a given startDelay modulo the interval. This refactors things internally to use a customizable NextRunTimeFunc, and exposes a way to run at a consistent startDelay or pass in a NextRunTimeFunc. A use case: if we have n FunctionSchedulers schedule with different startDelays but the same interval, and they sync up (e.g. they all get blocked on some IO call, which eventually gets fixed), then they won't unsync or will unsync slowly. Reviewed By: yfeldblum Differential Revision: D7651111 fbshipit-source-id: 3c7a49dbfaa073b913107474f039a53a0a03cfa0
Showing
Please register or sign in to comment