async fn fetch_messages_as_match_as_possible_at_once<TzB, TzA>(
    pool: &MySqlPool,
    before: Option<&DateTime<TzB>>,
    after: Option<&DateTime<TzA>>,
    interval_ms: u64
) -> Result<Vec<MessageRecord>>
where TzB: TimeZone, TzB::Offset: Display, TzA: TimeZone, TzA::Offset: Display,
Expand description

after から before の期間のメッセージを API から取得し、DB に保存する

(ただし、traQ の検索の仕様上、件数は 10000 件を超えると 10000 件と表示されるため、10000 件までしか取得しない)

§Arguments

  • pool - DB のコネクションプール
  • before - 取得するメッセージの期間の終わり
  • after - 取得するメッセージの期間の始まり
  • interval_ms - メッセージを取得する間隔 (ミリ秒)