mirror of
https://github.com/plausible/analytics.git
synced 2024-12-01 03:48:35 +03:00
16 lines
330 B
Elixir
16 lines
330 B
Elixir
|
defmodule Plausible.Workers.LockSites do
|
||
|
use Plausible.Repo
|
||
|
use Oban.Worker, queue: :lock_sites
|
||
|
|
||
|
@impl Oban.Worker
|
||
|
def perform(_job) do
|
||
|
users = Repo.all(from u in Plausible.Auth.User, preload: :subscription)
|
||
|
|
||
|
for user <- users do
|
||
|
Plausible.Billing.SiteLocker.check_sites_for(user)
|
||
|
end
|
||
|
|
||
|
:ok
|
||
|
end
|
||
|
end
|