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:
parent
56fe3a5d1a
commit
99535b4f46
1 changed files with 9 additions and 13 deletions
|
@ -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']
|
||||
@block_url = ENV['SCHEDULED_IPBLOCK_URLS'] if ENV['SCHEDULED_IPBLOCK_URLS'].present?
|
||||
@blockips = []
|
||||
grab_ip_blocks_addresses!
|
||||
add_ip_blocks_addresses!
|
||||
end
|
||||
grab_ip_blocks_addresses! if ENV['SCHEDULED_IPBLOCK_URLS'].present?
|
||||
add_ip_blocks_addresses! if ENV['SCHEDULED_IPBLOCK_URLS'].present?
|
||||
|
||||
if ENV['SCHEDULED_IPLIMIT_URLS'].present?
|
||||
@limit_url = ENV['SCHEDULED_IPBLIMIT_URLS']
|
||||
@limit_url = ENV['SCHEDULED_IPBLIMIT_URLS'] if ENV['SCHEDULED_IPLIMIT_URLS'].present?
|
||||
@limitips = []
|
||||
grab_ip_limit_addresses!
|
||||
add_ip_limit_addresses!
|
||||
end
|
||||
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!
|
||||
|
|
Loading…
Reference in a new issue