Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman committed Feb 1, 2024
1 parent 5b05aad commit 9ce10dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class PublishDir {
this.sourceDir = task.targetDir
this.sourceFileSystem = sourceDir.fileSystem
this.stageInMode = task.config.stageInMode
this.taskName = task.name
this.task = task
validatePublishMode()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ class TaskProcessor {
return null
}

protected TaskStartParams createTaskStartParams() {
synchronized protected TaskStartParams createTaskStartParams() {
return new TaskStartParams(TaskId.next(), indexCount.incrementAndGet())
}

Expand Down Expand Up @@ -909,14 +909,14 @@ class TaskProcessor {
final boolean checkCachedOutput(TaskRun seedTask, HashCode seedHash) {

// -- recursively check for cached outputs
final queue = [ seedHash ]
final handlersMap = [:] as Map<HashCode,TaskHandler>
List<HashCode> queue = [ seedHash ]
Map<HashCode,TaskHandler> handlers = [:]

while( !queue.isEmpty() ) {
final hash = queue.pop()

// -- skip tasks that have already been restored
if( hash in handlersMap )
if( hash in handlers )
continue

// -- get cache entry
Expand Down Expand Up @@ -984,11 +984,11 @@ class TaskProcessor {
}

// -- create task handler
handlersMap[hash] = new CachedTaskHandler(task, entry.trace)
handlers[hash] = new CachedTaskHandler(task, entry.trace)
}

// -- finalize all cached tasks
handlersMap.each { hash, handler ->
handlers.each { hash, handler ->
if( hash in restoredTasks )
return

Expand Down

0 comments on commit 9ce10dc

Please sign in to comment.