- def perform(
- %{
- "op" => "blocks_import",
- "blocker_id" => blocker_id,
- "blocked_identifiers" => blocked_identifiers
- },
- _job
- ) do
- blocker = User.get_by_id(blocker_id)
- User.perform(:blocks_import, blocker, blocked_identifiers)
- end
-
- def perform(
- %{
- "op" => "follow_import",
- "follower_id" => follower_id,
- "followed_identifiers" => followed_identifiers
- },
- _job
- ) do
- follower = User.get_by_id(follower_id)
- User.perform(:follow_import, follower, followed_identifiers)
- end
-
- def perform(%{"op" => "clean_expired_tokens"}, _job) do
- CleanWorker.perform(:clean)
- end
-
- def perform(%{"op" => "media_proxy_preload", "message" => message}, _job) do
- MediaProxyWarmingPolicy.perform(:preload, message)
+ def perform(%Job{args: %{"op" => "force_password_reset", "user_id" => user_id}}) do
+ user = User.get_cached_by_id(user_id)
+ User.perform(:force_password_reset, user)