Skip to content

Commit

Permalink
TSPS-140 Add Teaspoons notification types (#360)
Browse files Browse the repository at this point in the history
* TSPS-140 Add Teaspoons notification types

* scalafmt

* update workbench-libs version
  • Loading branch information
mmorgantaylor authored Dec 10, 2024
1 parent 164d540 commit d0a056c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ val slickV = "3.5.2"

val scalaTestV = "3.2.19"

val workbenchLibsHash = "9254729"
val workbenchGoogleV = s"0.32-$workbenchLibsHash"
val workbenchNotificationsV = s"0.7-$workbenchLibsHash"
val workbenchLibsHash = "5d9c477"
val workbenchGoogleV = s"0.33-$workbenchLibsHash"
val workbenchNotificationsV = s"0.9-$workbenchLibsHash"

resolvers ++= Seq(
"Broad Artifactory Releases" at "https://broadinstitute.jfrog.io/broadinstitute/libs-release/",
Expand Down
56 changes: 56 additions & 0 deletions src/main/scala/thurloe/notification/NotificationMonitor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,62 @@ class NotificationMonitorActor(val pollInterval: FiniteDuration,
),
Map.empty,
Map.empty
)

case TeaspoonsJobSucceededNotification(recipientUserId,
pipelineDisplayName,
jobId,
timeSubmitted,
timeCompleted,
quotaConsumedByJob,
quotaRemaining,
userDescription
) =>
thurloe.service.Notification(
Option(recipientUserId),
None,
None,
templateId,
Map(
"pipelineDisplayName" -> pipelineDisplayName,
"jobId" -> jobId,
"timeSubmitted" -> timeSubmitted,
"timeCompleted" -> timeCompleted,
"quotaConsumedByJob" -> quotaConsumedByJob,
"quotaRemaining" -> quotaRemaining,
"userDescription" -> userDescription
),
Map.empty,
Map.empty
)

case TeaspoonsJobFailedNotification(recipientUserId,
pipelineDisplayName,
jobId,
errorMessage,
timeSubmitted,
timeCompleted,
quotaConsumedByJob,
quotaRemaining,
userDescription
) =>
thurloe.service.Notification(
Option(recipientUserId),
None,
None,
templateId,
Map(
"pipelineDisplayName" -> pipelineDisplayName,
"jobId" -> jobId,
"errorMessage" -> errorMessage,
"timeSubmitted" -> timeSubmitted,
"timeCompleted" -> timeCompleted,
"quotaConsumedByJob" -> quotaConsumedByJob,
"quotaRemaining" -> quotaRemaining,
"userDescription" -> userDescription
),
Map.empty,
Map.empty
);
}
}
Expand Down

0 comments on commit d0a056c

Please sign in to comment.