configuration example complete
This commit is contained in:
parent
67bc00bb1d
commit
b38a3842b7
1 changed files with 10 additions and 4 deletions
14
bin/console
14
bin/console
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue