Changes
Build and Push Docker Images / build (push) Failing after 28s

This commit is contained in:
2026-05-06 17:45:05 +03:00
parent 64b0219038
commit b154fe51c3
15 changed files with 50 additions and 110 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
using Refit;
using Models.Requests;
using CvMatcher.Models.Responses;
namespace Api.Clients.Api.Contracts;
@@ -7,8 +8,8 @@ public interface ICvMatcherApi
{
[Multipart]
[Post("/api/cv/upload")]
Task<HttpResponseMessage> Upload([AliasAs("cv")] StreamPart cv, [AliasAs("gdprConsent")] bool gdprConsent);
Task<CvUploadResponse> Upload([AliasAs("cv")] StreamPart cv, [AliasAs("gdprConsent")] bool gdprConsent);
[Post("/api/cv/match-job")]
Task<HttpResponseMessage> MatchJob([Body] JobMatchRequest request);
Task<JobMatchResponse> MatchJob([Body] JobMatchRequest request);
}
+4 -16
View File
@@ -70,8 +70,8 @@ public sealed class CvMatcherController : ControllerBase
var stream = cv.OpenReadStream();
var part = new Refit.StreamPart(stream, cv.FileName, "application/pdf");
using var response = await _cvApi.Upload(part, gdprConsent);
return await ProxyResponseAsync(response, ct);
var res = await _cvApi.Upload(part, gdprConsent);
return Ok(res);
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
{
@@ -114,9 +114,8 @@ public sealed class CvMatcherController : ControllerBase
request.CvDocumentId,
!string.IsNullOrWhiteSpace(request.JobUrl),
!string.IsNullOrWhiteSpace(request.JobDescription));
using var response = await _cvApi.MatchJob(request);
return await ProxyResponseAsync(response, ct);
var res = await _cvApi.MatchJob(request);
return Ok(res);
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
{
@@ -129,15 +128,4 @@ public sealed class CvMatcherController : ControllerBase
return StatusCode(StatusCodes.Status502BadGateway, new { error = "CV matcher API request failed." });
}
}
private static async Task<ContentResult> ProxyResponseAsync(HttpResponseMessage response, CancellationToken ct)
{
var body = await response.Content.ReadAsStringAsync(ct);
return new ContentResult
{
StatusCode = (int)response.StatusCode,
Content = body,
ContentType = response.Content.Headers.ContentType?.ToString() ?? "application/json"
};
}
}
+1
View File
@@ -7,5 +7,6 @@ namespace Api.Services.Contracts
Task SendContactAsync(ContactRequest req, CancellationToken ct);
Task SendSubscribeAsync(SubscribeRequest req, CancellationToken ct);
Task SendFileDownloadNotificationAsync(string fileName, string? userIp, CancellationToken ct);
Task SendMatchAsync(string? explicitTo, string subject, string body, CancellationToken ct);
}
}
+5
View File
@@ -166,5 +166,10 @@ namespace Api.Services
await client.SendAsync(message, ct);
await client.DisconnectAsync(true, ct);
}
public Task SendMatchAsync(string? explicitTo, string subject, string body, CancellationToken ct)
{
throw new NotImplementedException();
}
}
}
+1
View File
@@ -36,6 +36,7 @@
<ItemGroup>
<ProjectReference Include="..\api-models\api-models.csproj" />
<ProjectReference Include="..\cv-matcher-api-models\cv-matcher-api-models.csproj" />
</ItemGroup>
</Project>