Module: Synchroniser::Ingestor

Included in:
Uri, Yql
Defined in:
lib/synchroniser/ingestor.rb

Defined Under Namespace

Modules: Uri, Yql

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#containerObject

Returns the value of attribute container.



3
4
5
# File 'lib/synchroniser/ingestor.rb', line 3

def container
  @container
end

Instance Method Details

#syncObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/synchroniser/ingestor.rb', line 5

def sync
  @container.find_all_flags.each {|flag|
    flag.status = 0
    flag.save
  }

  SyncItem.logger.info("Reset status for the set '#{@container.group}'")

  ingest.each {|item|
    item.save
  }

  @container.delete_expired_items
end