Class: Moe::Sequence::MetadataItem
- Inherits:
-
Struct
- Object
- Struct
- Moe::Sequence::MetadataItem
- Defined in:
- lib/moe/sequence/metadata_item.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#owner_id ⇒ Object
Returns the value of attribute owner_id.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count
3 4 5 |
# File 'lib/moe/sequence/metadata_item.rb', line 3 def count @count end |
#owner_id ⇒ Object
Returns the value of attribute owner_id
3 4 5 |
# File 'lib/moe/sequence/metadata_item.rb', line 3 def owner_id @owner_id end |
#payload ⇒ Object
Returns the value of attribute payload
3 4 5 |
# File 'lib/moe/sequence/metadata_item.rb', line 3 def payload @payload end |
#table_name ⇒ Object
Returns the value of attribute table_name
3 4 5 |
# File 'lib/moe/sequence/metadata_item.rb', line 3 def table_name @table_name end |
#uid ⇒ Object
Returns the value of attribute uid
3 4 5 |
# File 'lib/moe/sequence/metadata_item.rb', line 3 def uid @uid end |
Instance Method Details
#items ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/moe/sequence/metadata_item.rb', line 5 def items fetcher = ItemFetcher.new table_name, owner_id, uid remaining = count while remaining > Moe.config.batch_limit fetcher.fetch Moe.config.batch_limit remaining -= Moe.config.batch_limit end fetcher.fetch remaining fetcher.items end |