mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:35:38 -04:00
Only start refresh jobs when necessary
If `channel_threads` or `feed_threads` is set to zero the corresponding job is now not started.
This commit is contained in:
parent
b45f371911
commit
70e14f92a4
@ -162,8 +162,13 @@ end
|
|||||||
|
|
||||||
# Start jobs
|
# Start jobs
|
||||||
|
|
||||||
Invidious::Jobs.register Invidious::Jobs::RefreshChannelsJob.new(PG_DB)
|
if CONFIG.channel_threads > 0
|
||||||
Invidious::Jobs.register Invidious::Jobs::RefreshFeedsJob.new(PG_DB)
|
Invidious::Jobs.register Invidious::Jobs::RefreshChannelsJob.new(PG_DB)
|
||||||
|
end
|
||||||
|
|
||||||
|
if CONFIG.feed_threads > 0
|
||||||
|
Invidious::Jobs.register Invidious::Jobs::RefreshFeedsJob.new(PG_DB)
|
||||||
|
end
|
||||||
|
|
||||||
DECRYPT_FUNCTION = DecryptFunction.new(CONFIG.decrypt_polling)
|
DECRYPT_FUNCTION = DecryptFunction.new(CONFIG.decrypt_polling)
|
||||||
if CONFIG.decrypt_polling
|
if CONFIG.decrypt_polling
|
||||||
|
Loading…
Reference in New Issue
Block a user