hydra-queue-runner: Ensure regular status dumps

[?]
Mar 9, 2016, 4:11 PM
RGCPOSHYTIIRIUSUZ7ABXJHHSAYRUVQXAAEGFKIWKKIGLJERFMSQC

Dependencies

  • [2] 3ECTCHKL Make queue runner internal status available under /queue-runner-status
  • [3] BG6PEOB2 Make the output size limit configurable
  • [4] RQUAATWB Add status dump facility
  • [5] XV4AEKJC hydra-queue-runner: Handle status queries on the main thread
  • [6] FULDVXE2 Periodically dump/log status
  • [7] PLOZBRTR Add command ‘hydra-queue-runner --status’ to show current status
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] HJOEIMLR Refactor

Change contents

  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 686
    [4.2018][4.104:171]()
    if (log) printMsg(lvlInfo, format("status: %1%") % out.str());
    [4.2018]
    [4.171]
    if (log && time(0) >= lastStatusLogged + statusLogInterval) {
    printMsg(lvlInfo, format("status: %1%") % out.str());
    lastStatusLogged = time(0);
    }
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 832
    [4.551][4.208:278](),[4.278][2.57:101]()
    bool timeout = conn->await_notification(300, 0) == 0;
    dumpStatus(*conn, timeout);
    [4.551]
    [4.674]
    conn->await_notification(statusLogInterval / 2 + 1, 0);
    dumpStatus(*conn, true);
  • edit in src/hydra-queue-runner/state.hh at line 362
    [3.4353]
    [10.6778]
    time_t lastStatusLogged = 0;
    const int statusLogInterval = 20;