mirror of
https://github.com/Neetpone/foalfetch.git
synced 2025-02-08 18:06:43 +01:00
15 lines
286 B
Ruby
15 lines
286 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
ENV['REDIS_HOST'] ||= 'localhost'
|
||
|
|
||
|
#require 'hiredis'
|
||
|
require 'redis'
|
||
|
|
||
|
$redis = Redis.new(host: ENV['REDIS_HOST'])
|
||
|
|
||
|
if defined?(PhusionPassenger)
|
||
|
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
||
|
$redis.disconnect! if forked
|
||
|
end
|
||
|
end
|