must be added to the Sidekiq invokation in your systemd file The pull queue will handle link crawling, thread resolving, and OStatus processing. Such tasks are more likely to hang for a longer time (due to network requests) so it is more sensible to not make the "in-house" tasks wait for them.
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			504 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			504 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # frozen_string_literal: true
 | |
| 
 | |
| class AfterRemoteFollowRequestWorker
 | |
|   include Sidekiq::Worker
 | |
| 
 | |
|   sidekiq_options queue: 'pull', retry: 5
 | |
| 
 | |
|   def perform(follow_request_id)
 | |
|     follow_request  = FollowRequest.find(follow_request_id)
 | |
|     updated_account = FetchRemoteAccountService.new.call(follow_request.target_account.remote_url)
 | |
| 
 | |
|     return if updated_account.nil? || updated_account.locked?
 | |
| 
 | |
|     follow_request.destroy
 | |
|     FollowService.new.call(follow_request.account, updated_account.acct)
 | |
|   end
 | |
| end
 |