Skip to content

Commit

Permalink
remove local account check
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Nov 9, 2023
1 parent 16258d7 commit b71c855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
15 changes: 0 additions & 15 deletions app/workers/update_for_you_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion dist/scaling-service/mastodon-sidekiq-<queuename>@.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b71c855

Please sign in to comment.