Make check_tables config option

This commit is contained in:
Omar Roth 2019-04-11 12:13:25 -05:00
parent 5e141e869d
commit 4e6a931de3
2 changed files with 3 additions and 0 deletions

View File

@ -105,12 +105,14 @@ end
Kemal::CLI.new ARGV
if CONFIG.check_tables
# Check table integrity
analyze_table(PG_DB, logger, "channel_videos", ChannelVideo)
analyze_table(PG_DB, logger, "nonces", Nonce)
analyze_table(PG_DB, logger, "session_ids", SessionId)
analyze_table(PG_DB, logger, "users", User)
analyze_table(PG_DB, logger, "videos", Video)
end
# Start jobs
refresh_channels(PG_DB, logger, config.channel_threads, config.full_refresh)

View File

@ -115,6 +115,7 @@ user: String,
converter: ConfigPreferencesConverter,
},
dmca_content: {type: Array(String), default: [] of String}, # For compliance with DMCA, disables download widget using list of video IDs
check_tables: {type: Bool, default: false}, # Check table integrity, automatically try to add any missing columns, create tables, etc.
})
end