Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ abstract class JobBase(operationDef: OperationDef,

override val operation: OperationDef = operationDef

override val allowRunningTasksInParallel: Boolean = operationDef.allowParallel && !hasSelfDependencies
override val allowRunningTasksInParallel: Boolean = operationDef.allowParallel && !hasSelfDependencies(includeOptional = true)

override val isSelfDependent: Boolean = hasSelfDependencies
override val isSelfDependent: Boolean = hasSelfDependencies(includeOptional = false)

override def notificationTargets: Seq[JobNotificationTarget] = jobNotificationTargets

Expand Down Expand Up @@ -228,8 +228,11 @@ abstract class JobBase(operationDef: OperationDef,
}
}

private[core] def hasSelfDependencies: Boolean = {
operationDef.dependencies.exists(_.tables.contains(outputTableDef.name))
private[core] def hasSelfDependencies(includeOptional: Boolean): Boolean = {
if (includeOptional)
operationDef.dependencies.exists(_.tables.contains(outputTableDef.name))
else
operationDef.dependencies.filter(!_.isOptional).exists(_.tables.contains(outputTableDef.name))
}

private[core] def getInfoDateRange(infoDate: LocalDate, fromExpr: Option[String], toExpr: Option[String]): (LocalDate, LocalDate) = {
Expand Down
Loading