analytics/lib/workers/rotate_salts.ex
Uku Taht 4d55c4657a
Rotate salts on a daily basis (#224)
* Add daily salt rotation for user ids

* Rotate salts on a cron schedule daily

* Keep old salt fo 48 hours

* Double write for plausible.io to test salt rotation

* Rotate salts for every site
2020-07-15 11:47:24 +03:00

10 lines
202 B
Elixir

defmodule Plausible.Workers.RotateSalts do
use Plausible.Repo
use Oban.Worker, queue: :rotate_salts
@impl Oban.Worker
def perform(_args, _job) do
Plausible.Session.Salts.rotate()
end
end