Class: RealtimeIndexing

Inherits:
Object
  • Object
show all
Defined in:
backend/app/lib/realtime_indexing.rb

Class Method Summary collapse

Class Method Details

.blocking_updates_since(seq) ⇒ Object



39
40
41
# File 'backend/app/lib/realtime_indexing.rb', line 39

def self.blocking_updates_since(seq)
  longpolling.blocking_updates_since(seq)
end

.longpollingObject



5
6
7
8
9
10
11
# File 'backend/app/lib/realtime_indexing.rb', line 5

def self.longpolling
  if !@longpolling
    @longpolling = LongPolling.new(AppConfig[:realtime_index_backlog_ms].to_i)
  end

  @longpolling
end

.record_delete(uri) ⇒ Object



29
30
31
# File 'backend/app/lib/realtime_indexing.rb', line 29

def self.record_delete(uri)
  longpolling.record_update(:record => :deleted, :uri => uri)
end

.record_update(target, uri) ⇒ Object



24
25
26
# File 'backend/app/lib/realtime_indexing.rb', line 24

def self.record_update(target, uri)
  longpolling.record_update(:record => target, :uri => uri)
end

.reset!Object



19
20
21
# File 'backend/app/lib/realtime_indexing.rb', line 19

def self.reset!
  longpolling.reset!
end

.shutdownObject



14
15
16
# File 'backend/app/lib/realtime_indexing.rb', line 14

def self.shutdown
  @longpolling.shutdown if @longpolling
end

.updates_since(seq) ⇒ Object



34
35
36
# File 'backend/app/lib/realtime_indexing.rb', line 34

def self.updates_since(seq)
  longpolling.updates_since(seq)
end