|
|
@ -97,6 +97,8 @@ module Mastodon::CLI
|
|
|
|
say("Removed #{custom_emojis_count} custom emojis#{dry_run_mode_suffix}", :green)
|
|
|
|
say("Removed #{custom_emojis_count} custom emojis#{dry_run_mode_suffix}", :green)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CRAWL_SLEEP_TIME = 20
|
|
|
|
|
|
|
|
|
|
|
|
option :concurrency, type: :numeric, default: 50, aliases: [:c]
|
|
|
|
option :concurrency, type: :numeric, default: 50, aliases: [:c]
|
|
|
|
option :format, type: :string, default: 'summary', aliases: [:f]
|
|
|
|
option :format, type: :string, default: 'summary', aliases: [:f]
|
|
|
|
option :exclude_suspended, type: :boolean, default: false, aliases: [:x]
|
|
|
|
option :exclude_suspended, type: :boolean, default: false, aliases: [:x]
|
|
|
@ -168,8 +170,8 @@ module Mastodon::CLI
|
|
|
|
pool.post(domain, &work_unit)
|
|
|
|
pool.post(domain, &work_unit)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
sleep 20
|
|
|
|
sleep CRAWL_SLEEP_TIME
|
|
|
|
sleep 20 until pool.queue_length.zero?
|
|
|
|
sleep CRAWL_SLEEP_TIME until pool.queue_length.zero?
|
|
|
|
|
|
|
|
|
|
|
|
pool.shutdown
|
|
|
|
pool.shutdown
|
|
|
|
pool.wait_for_termination(20)
|
|
|
|
pool.wait_for_termination(20)
|
|
|
|