Skip to content

Commit

Permalink
Switched from time to random guid
Browse files Browse the repository at this point in the history
  • Loading branch information
lyze237 committed May 6, 2024
1 parent eb56709 commit 8db63f7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Jobs/BackupJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ private async Task Run(CancellationToken stoppingToken)

logger.LogInformation("Uploading {Amount} Folders", allDirectories.Count);
await UploadToProxmox(allDirectories.ToArray());

if (Directory.Exists(postgresDirectory.directory))
Directory.Delete(postgresDirectory.directory, true);
}

private async Task<List<(string, string)>> DoContainerBackups(IList<ContainerListResponse> containers,
Expand Down Expand Up @@ -89,7 +86,7 @@ private async Task Run(CancellationToken stoppingToken)
private async Task<(string name, string directory)> DoPostgresBackups(IList<ContainerListResponse> containers,
CancellationToken stoppingToken)
{
var directory = new DirectoryInfo($"/tmp/{DateTime.Now.ToString("O")}");
var directory = new DirectoryInfo($"/tmp/{Guid.NewGuid}");

foreach (var container in containers)
{
Expand Down

0 comments on commit 8db63f7

Please sign in to comment.