simplify cron config
This commit is contained in:
parent
0044e32864
commit
90780fdaad
3 changed files with 2 additions and 5 deletions
|
@ -72,8 +72,7 @@ env = environ.FileAwareEnv(
|
|||
NEODB_DOWNLOADER_RETRIES=(int, 3),
|
||||
# Number of marks required for an item to be included in discover
|
||||
NEODB_MIN_MARKS_FOR_DISCOVER=(int, 1),
|
||||
# Disable cron jobs
|
||||
NEODB_DISABLE_CRON=(bool, False),
|
||||
# Disable cron jobs, * for all
|
||||
NEODB_DISABLE_CRON_JOBS=(list, []),
|
||||
# INTEGRATED TAKAHE CONFIGURATION
|
||||
TAKAHE_DB_URL=(str, "postgres://takahe:takahepass@127.0.0.1:5432/takahe"),
|
||||
|
@ -243,7 +242,6 @@ DOWNLOADER_REQUEST_TIMEOUT = env("NEODB_DOWNLOADER_REQUEST_TIMEOUT")
|
|||
DOWNLOADER_CACHE_TIMEOUT = env("NEODB_DOWNLOADER_CACHE_TIMEOUT")
|
||||
DOWNLOADER_RETRIES = env("NEODB_DOWNLOADER_RETRIES")
|
||||
|
||||
DISABLE_CRON = env("NEODB_DISABLE_CRON")
|
||||
DISABLE_CRON_JOBS = env("NEODB_DISABLE_CRON_JOBS")
|
||||
FANOUT_LIMIT_DAYS = env("NEODB_FANOUT_LIMIT_DAYS")
|
||||
# ====== USER CONFIGUTRATION END ======
|
||||
|
|
|
@ -157,7 +157,7 @@ class Setup:
|
|||
Indexer.init()
|
||||
|
||||
# Register cron jobs if not yet
|
||||
if settings.DISABLE_CRON:
|
||||
if settings.DISABLE_CRON_JOBS and "*" in settings.DISABLE_CRON_JOBS:
|
||||
logger.info("Cron jobs are disabled.")
|
||||
JobManager.cancel_all()
|
||||
else:
|
||||
|
|
|
@ -32,7 +32,6 @@ x-shared:
|
|||
NEODB_LOGIN_MASTODON_WHITELIST:
|
||||
NEODB_MASTODON_CLIENT_SCOPE:
|
||||
NEODB_DISABLE_DEFAULT_RELAY:
|
||||
NEODB_DISABLE_CRON:
|
||||
NEODB_DISABLE_CRON_JOBS:
|
||||
NEODB_MIN_MARKS_FOR_DISCOVER:
|
||||
NEODB_SENTRY_DSN:
|
||||
|
|
Loading…
Add table
Reference in a new issue