Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-119

Add selector options to find_and_modify

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The find_and_update method would be extremely useful for pulling a batch of records to be added to a queue. In this scenario, all you really need is the _id, to put that on the queue, so being able to specify :fields would increase performance. :limit is obviously dependent on update multi, but would be helpful for restricting the size of the batch, and :order would also help in determining which ones to retrieve.

      It would also be nice to have an option for only returning the items that were successfully updated, or returning all items.

      If all of these were implemented together, it would make a very nice interface for distributed queue selection and scheduling.

            Assignee:
            kbanker Kyle Banker
            Reporter:
            fields Adam Fields
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: