diff --git a/scribe/elasticsearch/service.py b/scribe/elasticsearch/service.py index 1b36497..a7ee9f5 100644 --- a/scribe/elasticsearch/service.py +++ b/scribe/elasticsearch/service.py @@ -357,6 +357,8 @@ class ElasticSyncService(BlockchainReaderService): yield self.start_cancellable(self.run_es_notifier) yield self.reindex(force=self._force_reindex) yield self.catch_up() + self.block_count_metric.set(self.last_state.height) + yield self.start_prometheus() yield self.start_cancellable(self.refresh_blocks_forever) def _iter_stop_tasks(self): diff --git a/scribe/hub/service.py b/scribe/hub/service.py index 7708cf2..1bed40a 100644 --- a/scribe/hub/service.py +++ b/scribe/hub/service.py @@ -92,6 +92,7 @@ class HubServerService(BlockchainReaderService): yield self.start_cancellable(self.es_notification_client.maintain_connection) yield self.start_cancellable(self.refresh_blocks_forever) yield self.finished_initial_catch_up.wait() + self.block_count_metric.set(self.last_state.height) yield self.start_prometheus() yield self.start_cancellable(self.receive_es_notifications) yield self.session_manager.search_index.start()