1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Update ip_spamlist_urls_scheduler.rb

This commit is contained in:
Shlee 2024-02-17 01:41:06 +10:30 committed by GitHub
parent 56fe3a5d1a
commit 99535b4f46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,19 +6,15 @@ class Scheduler::IPSpamlistURLScheduler
sidekiq_options retry: 0
def perform
if ENV['SCHEDULED_IPBLOCK_URLS'].present?
@block_url = ENV['SCHEDULED_IPBLOCK_URLS']
@blockips = []
grab_ip_blocks_addresses!
add_ip_blocks_addresses!
end
if ENV['SCHEDULED_IPLIMIT_URLS'].present?
@limit_url = ENV['SCHEDULED_IPBLIMIT_URLS']
@limitips = []
grab_ip_limit_addresses!
add_ip_limit_addresses!
end
@block_url = ENV['SCHEDULED_IPBLOCK_URLS'] if ENV['SCHEDULED_IPBLOCK_URLS'].present?
@blockips = []
grab_ip_blocks_addresses! if ENV['SCHEDULED_IPBLOCK_URLS'].present?
add_ip_blocks_addresses! if ENV['SCHEDULED_IPBLOCK_URLS'].present?
@limit_url = ENV['SCHEDULED_IPBLIMIT_URLS'] if ENV['SCHEDULED_IPLIMIT_URLS'].present?
@limitips = []
grab_ip_limit_addresses! if ENV['SCHEDULED_IPLIMIT_URLS'].present?
add_ip_limit_addresses! if ENV['SCHEDULED_IPLIMIT_URLS'].present?
end
def grab_ip_blocks_addresses!