mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-28 09:38:31 +00:00
show message when connection to the database is not possible
This commit is contained in:
parent
df8839d1f0
commit
8cd9d53fb1
@ -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…
Reference in New Issue
Block a user