ee/app/finders/geo/job_artifact_registry_finder.rb
# Find limited amount of non replicated job artifacts.
#
# You can pass a list with `except_artifact_ids:` so you can exclude items you
# already scheduled but haven't finished and aren't persisted to the database yet
#
# TODO: Alternative here is to use some sort of window function with a cursor instead
#       of simply limiting the query and passing a list of items we don't want
#
# @param [Integer] batch_size used to limit the results returned
# @param [Array<Integer>] except_artifact_ids ids that will be ignored from the query
Find limited amount of non replicated job artifacts.
You can pass a list with `except_artifact_ids:` so you can exclude items you
already scheduled but haven't finished and aren't persisted to the database yet

Alternative here is to use some sort of window function with a cursor instead
of simply limiting the query and passing a list of items we don't want
Find limited amount of non replicated job artifacts . You can pass a list with ` except_artifact_ids : ` so you can exclude items you already scheduled but haven ' t finished and aren ' t persisted to the database yet Alternative here is to use some sort of window function with a cursor instead of simply limiting the query and passing a list of items we don ' t want
def find_unsynced(batch_size:, except_artifact_ids: [])
      relation =
        if use_legacy_queries?
          legacy_find_unsynced(except_artifact_ids: except_artifact_ids)
        else
          fdw_find_unsynced(except_artifact_ids: except_artifact_ids)
        end
      relation.limit(batch_size)
    end
def find_unsynced ( batch_size : , except_artifact_ids : [ ] ) relation = if use_legacy_queries? legacy_find_unsynced ( except_artifact_ids : except_artifact_ids ) else fdw_find_unsynced ( except_artifact_ids : except_artifact_ids ) end relation . limit ( batch_size ) end
Find limited amount of non replicated job artifacts.
Find limited amount of non replicated job artifacts .
batch_size
<not_specific>
except_artifact_ids
<not_specific>
<not_specific>
except_artifact_ids ids that will be ignored from the query
except_artifact_ids ids that will be ignored from the query