News for hackers. Stuff that matters.
Re:Who Watches Watchmen? – Integrating Elixir Applications w... by pm90 on Monday January 17, 2022 @05:50PM (#29972600)
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”?
Re:Who Watches Watchmen? – Integrating Elixir Applications w... by hauleth on Monday January 17, 2022 @05:52PM (#29972623)
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`.