crawl less often, and fewer statuses

main
Tao Bojlén 2023-06-10 20:23:07 +01:00
rodzic a4eaf75c70
commit 9c0bf93420
3 zmienionych plików z 6 dodań i 4 usunięć

1
.gitignore vendored
Wyświetl plik

@ -1,7 +1,6 @@
*.csv *.csv
.idea/ .idea/
*.gexf *.gexf
data/
*.class *.class
backend/.sobelow backend/.sobelow

Wyświetl plik

@ -59,9 +59,9 @@ config :backend, Mastodon.Messenger,
config :backend, :crawler, config :backend, :crawler,
status_age_limit_days: 28, status_age_limit_days: 28,
status_count_limit: 5000, status_count_limit: 1000,
personal_instance_threshold: 10, personal_instance_threshold: 10,
crawl_interval_mins: 30, crawl_interval_mins: 60,
crawl_workers: 100, crawl_workers: 100,
blacklist: [ blacklist: [
# spam # spam
@ -100,6 +100,8 @@ config :backend, Backend.Scheduler,
{"0 */3 * * *", {Backend.Scheduler, :check_for_spam_instances, []}} {"0 */3 * * *", {Backend.Scheduler, :check_for_spam_instances, []}}
] ]
config :backend, :environment, Mix.env()
# Import environment specific config. This must remain at the bottom # Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above. # of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs" import_config "#{Mix.env()}.exs"

Wyświetl plik

@ -31,7 +31,8 @@ defmodule Backend.Application do
] ]
children = children =
if Enum.member?(["true", 1, "1"], System.get_env("SKIP_CRAWL")) or Mix.env() == :test do if Enum.member?(["true", 1, "1"], System.get_env("SKIP_CRAWL")) or
Application.get_env(:backend, :environment) == :test do
children children
else else
children ++ [Backend.Crawler.StaleInstanceManager] children ++ [Backend.Crawler.StaleInstanceManager]