Skip to content

Commit

Permalink
Merge pull request #416 from dabutvin/cleanup
Browse files Browse the repository at this point in the history
clean up local temp directory proactively
  • Loading branch information
dabutvin committed Jun 28, 2019
2 parents 1e2c964 + 935a8bb commit 121037e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CompressImagesFunction/CompressImagesFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ public static class CompressImagesFunction
});
}

try
{
Directory.Delete(compressImagesParameters.LocalPath, recursive: true);
}
catch (Exception exception)
{
logger.LogError(exception, "Error cleaning up local directory");
}

logger.LogInformation("CompressImagesFunction: finished run for {Owner}/{RepoName}", compressImagesMessage.Owner, compressImagesMessage.RepoName);
}
}
Expand Down

0 comments on commit 121037e

Please sign in to comment.