remove k8s configs, update worker for multi-languages support, add local-submit option

This commit is contained in:
prixod
2025-10-27 21:28:46 +04:00
parent 7f0e7fbe20
commit 6041acb8ed
38 changed files with 2205 additions and 342 deletions

View File

@@ -17,6 +17,13 @@ public class CallbackService : ICallbackService
public async Task SendStatusAsync(string callbackUrl, TesterResponseModel response)
{
// Check if callback should be logged instead of sent via HTTP
if (IsLogCallback(callbackUrl))
{
LogCallback(response);
return;
}
_logger.LogInformation("Sending status update to {CallbackUrl} for submit {SubmitId}", callbackUrl, response.SubmitId);
try
@@ -36,4 +43,37 @@ public class CallbackService : ICallbackService
// Don't throw - callback failures shouldn't stop testing
}
}
private bool IsLogCallback(string callbackUrl)
{
if (string.IsNullOrWhiteSpace(callbackUrl))
{
return false;
}
var normalized = callbackUrl.Trim().ToLowerInvariant();
return normalized == "log" ||
normalized == "console" ||
normalized.StartsWith("log://");
}
private void LogCallback(TesterResponseModel response)
{
var options = new JsonSerializerOptions
{
WriteIndented = true,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};
var json = JsonSerializer.Serialize(response, options);
_logger.LogInformation(
"\n" +
"╔═══════════════════════════════════════════════════════════════╗\n" +
"║ CALLBACK RESULT ║\n" +
"╠═══════════════════════════════════════════════════════════════╣\n" +
"{Json}\n" +
"╚═══════════════════════════════════════════════════════════════╝",
json);
}
}