Skip to content

Commit

Permalink
Enable grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
Redm4x committed Feb 20, 2024
1 parent e67d6c9 commit 963304f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions indexer/src/providers/providerStatusProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { ProviderSnapshot } from "@src/../../shared/dbSchemas/akash/providerSnap
import { fetchAndSaveProviderStats as grpcFetchAndSaveProviderStats } from "./statusEndpointHandlers/grpc";
import { fetchAndSaveProviderStats as restFetchAndSaveProviderStats } from "./statusEndpointHandlers/rest";

const IsGrpcEnpointEnabled = false;
const ConcurrentStatusCall = 10;
const StatusCallTimeout = 10_000; // 10 seconds

Expand Down Expand Up @@ -36,7 +35,7 @@ export async function syncProvidersInfo() {
});

const versionStr = versionResponse.data.akash.version;
if (IsGrpcEnpointEnabled && versionStr && semver.gte(versionStr, "0.5.0")) {
if (versionStr && semver.gte(versionStr, "0.5.0")) {
await grpcFetchAndSaveProviderStats(provider, versionResponse.data.akash.cosmosSdkVersion, versionResponse.data.akash.version, StatusCallTimeout);
} else {
await restFetchAndSaveProviderStats(provider, versionResponse.data.akash.cosmosSdkVersion, versionResponse.data.akash.version, StatusCallTimeout);
Expand Down

0 comments on commit 963304f

Please sign in to comment.