Module: MongoTanker
- Defined in:
- lib/mongo_tanker/orm/mongoid.rb,
lib/mongo_tanker.rb,
lib/mongo_tanker/version.rb,
lib/mongo_tanker/tank/index.rb,
lib/mongo_tanker/workers/sidekiq_workers/add_to_index_worker.rb,
lib/mongo_tanker/workers/sidekiq_workers/remove_from_index_worker.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.1.0"- @@public_url =
ENV['INDEXTANK_PUBLIC_URL']
- @@private_url =
ENV['INDEXTANK_PRIVATE_URL']
- @@default_index =
Rails.env
- @@index_key =
nil- @@run_in_the_background =
false- @@background_engine =
:sidekiq- @@queue_name =
nil
Class Method Summary collapse
- .queue_name=(value) ⇒ Object
-
.setup {|_self| ... } ⇒ Object
Default way to setup Devise.
Instance Method Summary collapse
-
#background_engine ⇒ Object
This is for later use.
-
#default_index ⇒ Object
Default index name (default: Rails.env).
-
#index_key ⇒ Object
Unique indexing key This is used for development and/or shared environments that may be writing to the same single index.
-
#private_url ⇒ Object
Private Index Tank URL.
-
#public_url ⇒ Object
Public Index Tank URL.
-
#queue_name ⇒ Object
Queue Name to use (default is nil - default of the engine).
-
#run_in_the_background ⇒ Object
Process in the background? If you are running Sidekiq, setting this value to true will run workers push updates to your indexes.
Class Method Details
.queue_name=(value) ⇒ Object
44 45 46 |
# File 'lib/mongo_tanker.rb', line 44 def self.queue_name=(value) @@queue_name = value.to_s.downcase.parameterize.underscore.to_sym end |
.setup {|_self| ... } ⇒ Object
Default way to setup Devise. Run rails generate devise_install to create a fresh initializer with all configuration values.
50 51 52 |
# File 'lib/mongo_tanker.rb', line 50 def self.setup yield self end |
Instance Method Details
#background_engine ⇒ Object
This is for later use
37 |
# File 'lib/mongo_tanker.rb', line 37 mattr_accessor :background_engine |
#default_index ⇒ Object
Default index name (default: Rails.env)
19 |
# File 'lib/mongo_tanker.rb', line 19 mattr_accessor :default_index |
#index_key ⇒ Object
Unique indexing key This is used for development and/or shared environments that may be writing to the same single index. This way, you can index the data with a unique key that can be used to retrive that data as well
26 |
# File 'lib/mongo_tanker.rb', line 26 mattr_accessor :index_key |
#private_url ⇒ Object
Private Index Tank URL
15 |
# File 'lib/mongo_tanker.rb', line 15 mattr_accessor :private_url |
#public_url ⇒ Object
Public Index Tank URL
11 |
# File 'lib/mongo_tanker.rb', line 11 mattr_accessor :public_url |
#queue_name ⇒ Object
Queue Name to use (default is nil - default of the engine)
41 |
# File 'lib/mongo_tanker.rb', line 41 mattr_accessor :queue_name |
#run_in_the_background ⇒ Object
Process in the background? If you are running Sidekiq, setting this value to true will run workers push updates to your indexes. If set to false, then standard callbacks will be used on your models instead.
33 |
# File 'lib/mongo_tanker.rb', line 33 mattr_accessor :run_in_the_background |