add loginfo on the toCsv()
This commit is contained in:
parent
1fb95cbb56
commit
ea5ce5617a
|
@ -316,14 +316,17 @@ internal static class Program
|
|||
private static async Task<Boolean> UploadCsv(StatusRecord status, DateTime timeStamp)
|
||||
{
|
||||
var s3Config = status.Config.S3;
|
||||
var csv = status.ToCsv().LogInfo();
|
||||
if (s3Config is null)
|
||||
return false;
|
||||
|
||||
var csv = status.ToCsv();
|
||||
var s3Path = timeStamp + ".csv";
|
||||
var request = s3Config.CreatePutRequest(s3Path);
|
||||
var response = await request.PutAsync(new StringContent(csv));
|
||||
|
||||
// This is temporary for Wittman
|
||||
//await File.WriteAllTextAsync("/var/www/html/status.csv", csv.SplitLines().Where(l => !l.Contains("Secret")).JoinLines());
|
||||
|
||||
if (response.StatusCode != 200)
|
||||
{
|
||||
Console.WriteLine("ERROR: PUT");
|
||||
|
|
Loading…
Reference in New Issue