Skip to content

Commit

Permalink
Delete unused production code
Browse files Browse the repository at this point in the history
  • Loading branch information
aednichols committed Oct 24, 2024
1 parent d45e0d3 commit 174a9cc
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ class MetadataSlickDatabase(originalDatabaseConfig: Config)
} yield ()
}

override def metadataEntryExists(workflowExecutionUuid: String)(implicit ec: ExecutionContext): Future[Boolean] = {
val action = dataAccess.metadataEntryExistsForWorkflowExecutionUuid(workflowExecutionUuid).result
runTransaction(action)
}

override def metadataSummaryEntryExists(
workflowExecutionUuid: String
)(implicit ec: ExecutionContext): Future[Boolean] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,6 @@ trait MetadataEntryComponent {
}.size
)

val metadataEntryExistsForWorkflowExecutionUuid = Compiled((workflowExecutionUuid: Rep[String]) =>
(for {
metadataEntry <- metadataEntries
if metadataEntry.workflowExecutionUuid === workflowExecutionUuid
} yield metadataEntry).exists
)

def metadataEntryExistsForWorkflowExecutionUuid(workflowId: Rep[String], key: Rep[String]): Rep[Boolean] =
metadataEntries
.filter(metadataEntry =>
metadataEntry.workflowExecutionUuid === workflowId &&
metadataEntry.metadataKey === key &&
metadataEntry.metadataValue.isDefined
)
.exists

val metadataEntriesForWorkflowExecutionUuidAndMetadataKey =
Compiled((workflowExecutionUuid: Rep[String], metadataKey: Rep[String]) =>
(for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ trait MetadataSqlDatabase extends SqlDatabase {
labelMetadataKey: String
)(implicit ec: ExecutionContext): Future[Unit]

def metadataEntryExists(workflowExecutionUuid: String)(implicit ec: ExecutionContext): Future[Boolean]

def metadataSummaryEntryExists(workflowExecutionUuid: String)(implicit ec: ExecutionContext): Future[Boolean]

def queryMetadataEntries(workflowExecutionUuid: String, timeout: Duration)(implicit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,6 @@ trait MetadataDatabaseAccess {
_ map { case (id, labelsForId) => WorkflowId.fromString(id) -> labelsForId }
}

def workflowWithIdExistsInMetadata(possibleWorkflowId: String)(implicit ec: ExecutionContext): Future[Boolean] =
metadataDatabaseInterface.metadataEntryExists(possibleWorkflowId)

def workflowWithIdExistsInMetadataSummaries(possibleWorkflowId: String)(implicit
ec: ExecutionContext
): Future[Boolean] =
Expand Down

0 comments on commit 174a9cc

Please sign in to comment.