remove k8s configs, update worker for multi-languages support, add local-submit option
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user