public async Task StartRun() { await postgresTask; if (run != null) { PostgresExport.StopRun(run); } var runid = await PostgresExport.StartRun(curSessionId); //var s3Info = new S3FileInfo(client, "gtadata", run.archiveKey); //S3Stream = s3Info.Create(); outputPath = Path.GetTempFileName(); S3Stream = File.Open(outputPath, FileMode.Truncate); archive = new ZipArchive(S3Stream, ZipArchiveMode.Create); //archive = new ZipArchive(, ZipArchiveMode.Create); //archive = ZipFile.Open(Path.Combine(dataPath, run.guid + ".zip"), ZipArchiveMode.Create); run = runid; enabled = true; }
public void StopRun() { runTask?.Wait(); ImageUtils.WaitForProcessing(); enabled = false; PostgresExport.StopRun(run); run = null; Game.Player.LastVehicle.Alpha = int.MaxValue; }
public void StopRun() { runTask?.Wait(); ImageUtils.WaitForProcessing(); if (S3Stream.CanWrite) { S3Stream.Flush(); } enabled = false; UploadFile().Wait(); PostgresExport.StopRun(run); run = null; Game.Player.LastVehicle.Alpha = int.MaxValue; }
public async Task StartRun(bool enable = true) { await postgresTask; if (run != null) { PostgresExport.StopRun(run); } var runid = await PostgresExport.StartRun(curSessionId); run = runid; if (enable) { enabled = true; } }