Skip to content

Commit

Permalink
Merge pull request #72 from amanjpro/fix/clear-scratch-dir-upon-start
Browse files Browse the repository at this point in the history
Clear scratch dir upon start
  • Loading branch information
amanjpro authored Aug 27, 2020
2 parents 7712b56 + 9cfdd81 commit 232f9f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/AppConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object AppConfig {
val port = appConfig.getInt("port")
val namespace = Try(appConfig.getString("namespace")).toOption
val scratchDir = new File(appConfig.getString("scratch-dir"))
scratchDir.mkdirs
scratchDir.delete
val address = appConfig.getString("binding-address")
new AppConfig(readEntries(appConfig), namespace, scratchDir,
refreshRate, address, port)
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/checker/checker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package object checker {
}

def debugFile(scratchDir: File, groupId: Int, jobId: Int): String = {
scratchDir.mkdirs
val fileName =
scratchDir.toString / s"group-$groupId-job-$jobId-stdout.txt"
fileName
Expand Down

0 comments on commit 232f9f4

Please sign in to comment.