lib/rocket_job/sliced/slices.rb in rocketjob-4.1.1 vs lib/rocket_job/sliced/slices.rb in rocketjob-4.2.0
- old
+ new
@@ -96,9 +96,10 @@
all.collection.indexes.create_one(state: 1, _id: 1) if all.collection.indexes.none? { |i| i['name'] == 'state_1__id_1' }
rescue Mongo::Error::OperationFailure
all.collection.indexes.create_one(state: 1, _id: 1)
end
+ # Forward additional methods.
def_instance_delegators :@all, :collection, :count, :delete_all, :first, :find, :last, :nor, :not, :or, :to_a, :where
# Drop this collection when it is no longer needed
def drop
all.collection.drop