Don't retry pings

This commit is contained in:
Andras Schmelczer 2025-01-02 20:56:46 +00:00
commit 5870636210
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -19,6 +19,7 @@ export interface CheckConnectionResult {
} }
export class SyncService { export class SyncService {
private client: Client<paths>; private client: Client<paths>;
private clientWithoutRetries: Client<paths>;
public constructor(private readonly database: Database) { public constructor(private readonly database: Database) {
this.createClient(database.getSettings()); this.createClient(database.getSettings());
@ -41,7 +42,7 @@ export class SyncService {
} }
public async ping(): Promise<components["schemas"]["PingResponse"]> { public async ping(): Promise<components["schemas"]["PingResponse"]> {
const response = await this.client.GET("/ping", { const response = await this.clientWithoutRetries.GET("/ping", {
params: { params: {
header: { header: {
authorization: `Bearer ${ authorization: `Bearer ${
@ -304,5 +305,9 @@ export class SyncService {
baseUrl: settings.remoteUri, baseUrl: settings.remoteUri,
fetch: retriedFetch, fetch: retriedFetch,
}); });
this.clientWithoutRetries = createClient<paths>({
baseUrl: settings.remoteUri,
});
} }
} }