configuration example complete

This commit is contained in:
Brendan McDevitt 2019-04-06 00:03:01 -05:00
parent 67bc00bb1d
commit b38a3842b7

View file

@ -15,10 +15,16 @@ def rest_client_toggle_log(default=false)
end
end
# not working yet
config = Pastebinner::Configuration.new
pb = Pastebinner::ApiClient.new(config.api_key, config.api_username, config.api_password)
es = Pastebinner::ElasticSearchHelper.new(ENV['elastic_search_url'], 'pastes')
Pastebinner.configure do |config|
config.api_key = ENV['pastebin_api_key']
config.api_username = ENV['pastebin_username']
config.api_password = ENV['pastebin_password']
config.elasticsearch_url = ENV['elasticsearch_url']
config.redis_url = ENV['redis_url']
end
pb = Pastebinner::ApiClient.new(Pastebinner.configuration.api_key, Pastebinner.configuration.api_username, Pastebinner.configuration.api_password)
es = Pastebinner::ElasticSearchHelper.new(Pastebinner.configuration.elasticsearch_url, 'pastes')
# sidekiq worker to send pastes to es
paste_to_es_job = Pastebinner::PasteToEs.new