diff --git a/app/workers/update_for_you_worker.rb b/app/workers/update_for_you_worker.rb index 56ffd5c83..f6fd0070c 100644 --- a/app/workers/update_for_you_worker.rb +++ b/app/workers/update_for_you_worker.rb @@ -16,22 +16,12 @@ def perform(opts) @personal = PersonalForYou.new @acct = opts['acct'] @user = mammoth_user(@acct).wait - # This is temperary - @account = local_account if @user[:acct].nil? update_user_status('error').wait return nil end - # Unable to resolve account - # Set Status to 'error' - if @account.nil? - update_user_status('error').wait - ResolveAccountWorker.perform_async(@acct) - return nil - end - # If rebuild is true, Zero Out User's for you feed @personal.reset(@user[:acct]) if opts['rebuild'] @@ -59,11 +49,6 @@ def update_user_status(status) end end - def local_account - domain = @user[:domain] == ENV['LOCAL_DOMAIN'] ? nil : @user[:domain] - Account.where(username: @user[:username], domain: domain).first - end - def mammoth_user(acct) Async do @personal.user(acct) diff --git a/dist/scaling-service/mastodon-sidekiq-@.service b/dist/scaling-service/mastodon-sidekiq-@.service index aeb7aa6e4..5a8a58775 100644 --- a/dist/scaling-service/mastodon-sidekiq-@.service +++ b/dist/scaling-service/mastodon-sidekiq-@.service @@ -8,7 +8,9 @@ Description=Mastodon Sidekiq %j processor %i After=network.target [Service] -Type=simple +Type=notify +# If your Sidekiq process locks up, systemd's watchdog will restart it within seconds. +WatchdogSec=10 User=mastodon WorkingDirectory=/home/mastodon/live EnvironmentFile=/etc/default/mastodon-sidekiq