diff --git a/app/jobs/scheduled/embeddings_backfill.rb b/app/jobs/scheduled/embeddings_backfill.rb index 0c4c0a9a..383c4c05 100644 --- a/app/jobs/scheduled/embeddings_backfill.rb +++ b/app/jobs/scheduled/embeddings_backfill.rb @@ -88,7 +88,7 @@ module Jobs .where(<<~SQL) #{table_name}.model_version < #{vector_rep.version} OR - #{table_name}.strategy_version < #{strategy.version} + #{table_name}.strategy_version < #{vector_rep.strategy_version} SQL .limit(limit - rebaked) .pluck(:id) diff --git a/spec/jobs/scheduled/embeddings_backfill_spec.rb b/spec/jobs/scheduled/embeddings_backfill_spec.rb index b54c2c80..c7fcc436 100644 --- a/spec/jobs/scheduled/embeddings_backfill_spec.rb +++ b/spec/jobs/scheduled/embeddings_backfill_spec.rb @@ -25,6 +25,7 @@ RSpec.describe Jobs::EmbeddingsBackfill do SiteSetting.ai_embeddings_enabled = true SiteSetting.ai_embeddings_discourse_service_api_endpoint = "http://test.com" SiteSetting.ai_embeddings_backfill_batch_size = 1 + SiteSetting.ai_embeddings_per_post_enabled = true Jobs.run_immediately! end