diff --git a/lib/dpul_collections/index_metrics_tracker.ex b/lib/dpul_collections/index_metrics_tracker.ex index b89252f8..4378267d 100644 --- a/lib/dpul_collections/index_metrics_tracker.ex +++ b/lib/dpul_collections/index_metrics_tracker.ex @@ -28,8 +28,8 @@ defmodule DpulCollections.IndexMetricsTracker do {:ok, %{}} end - @spec register_fresh_index(source :: module()) :: term() - def register_fresh_index(source) do + @spec register_fresh_start(source :: module()) :: term() + def register_fresh_start(source) do GenServer.call(__MODULE__, {:fresh_index, source}) end diff --git a/lib/dpul_collections/indexing_pipeline/database_producer.ex b/lib/dpul_collections/indexing_pipeline/database_producer.ex index 41af71e0..2f9b6d8a 100644 --- a/lib/dpul_collections/indexing_pipeline/database_producer.ex +++ b/lib/dpul_collections/indexing_pipeline/database_producer.ex @@ -65,7 +65,7 @@ defmodule DpulCollections.IndexingPipeline.DatabaseProducer do source_module.get_cache_entries_since!(last_queried_marker, total_demand, cache_version) if last_queried_marker == nil && length(records) > 0 do - DpulCollections.IndexMetricsTracker.register_fresh_index(source_module) + DpulCollections.IndexMetricsTracker.register_fresh_start(source_module) end new_state = diff --git a/test/dpul_collections/index_metrics_tracker_test.exs b/test/dpul_collections/index_metrics_tracker_test.exs index 9607b1b6..73297e2f 100644 --- a/test/dpul_collections/index_metrics_tracker_test.exs +++ b/test/dpul_collections/index_metrics_tracker_test.exs @@ -25,7 +25,7 @@ defmodule DpulCollections.IndexMetricsTrackerTest do } ) - IndexMetricsTracker.register_fresh_index(HydrationProducerSource) + IndexMetricsTracker.register_fresh_start(HydrationProducerSource) # Send an ack done with acked_count 1 :telemetry.execute( [:database_producer, :ack, :done],