Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is this a bug/typo?

  :systemd.ready(),
      :systemd.set_status(down: [status: "drained"]),
      {Plug.Cowboy.Drainer, refs: :all, shutdown: 10_000},
      :systemd.set_status(down: [status: "draining"])


Shouldn’t the status be set to “draining” first and then, after drain is complete, to “drained”?


No, because these states are set on shutdown, and processes are killed in reverse order. So first the `draining` message will be set and then `drained`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: