mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-10 15:30:31 -04:00
show message when connection to the database is not possible
This commit is contained in:
parent
df8839d1f0
commit
8cd9d53fb1
1 changed files with 7 additions and 1 deletions
|
@ -60,7 +60,13 @@ alias IV = Invidious
|
||||||
CONFIG = Config.load
|
CONFIG = Config.load
|
||||||
HMAC_KEY = CONFIG.hmac_key
|
HMAC_KEY = CONFIG.hmac_key
|
||||||
|
|
||||||
PG_DB = DB.open CONFIG.database_url
|
PG_DB = begin
|
||||||
|
DB.open CONFIG.database_url
|
||||||
|
rescue ex
|
||||||
|
puts "Failed to connect to PostgreSQL database: #{ex.cause.try &.message}"
|
||||||
|
puts "Check your 'config.yml' database settings or PostgreSQL settings."
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
ARCHIVE_URL = URI.parse("https://archive.org")
|
ARCHIVE_URL = URI.parse("https://archive.org")
|
||||||
PUBSUB_URL = URI.parse("https://pubsubhubbub.appspot.com")
|
PUBSUB_URL = URI.parse("https://pubsubhubbub.appspot.com")
|
||||||
REDDIT_URL = URI.parse("https://www.reddit.com")
|
REDDIT_URL = URI.parse("https://www.reddit.com")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue