Skip to content
Snippets Groups Projects

Add cron worker to automatically rollout zoekt exact code search to paid namespaces

Merged John Mason requested to merge jm-namespace-assignment-service into master
1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -167,11 +167,19 @@ def simulate_index(node)
end
def add_project_to_index(index, stats)
index[:projects][:project_id_from] ||= stats.project_id
# Initialize project_id_from for the first project in the index
if index[:projects][:project_id_from].nil? || index[:projects][:project_id_from] > stats.project_id
index[:projects][:project_id_from] = stats.project_id
end
# Update project_id_to to the latest project
index[:projects][:project_id_to] = stats.project_id
# Update the required storage bytes
index[:required_storage_bytes] += scaled_size(stats)
end
def find_replica
enabled_namespace.replicas.order(:created_at).offset(replica_plans.size).first
end
Loading