Skip to content

Commit

Permalink
Code review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed Feb 20, 2025
1 parent d7c083e commit 836a9b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion admin/app/com/lucidchart/piezo/GeneratorClassLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GeneratorClassLoader extends ClassLoader(classOf[GeneratorClassLoader].get

def getClassLoader: GeneratorClassLoader = this

def loadClass[T](name: String, clazz: Class[T]): Class[_ <: T] = loadClass(name).asInstanceOf[Class[_ <: T]]
def loadClass[T](name: String, clazz: Class[T]): Class[? <: T] = loadClass(name).asInstanceOf[Class[? <: T]]

def initialize() = ()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ trait JobDataHelper {

implicit def jobDataMap: Mapping[Option[JobDataMap]] =
optional(
list(mapping("key" -> text, "value" -> text)(DataMap.apply)(r => Some((r.key, r.value))))
list(mapping("key" -> text, "value" -> text)(DataMap.apply)(data => Some((data.key, data.value))))
.transform(mapToJobData, jobDataToMap),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class TriggerFormHelper(scheduler: Scheduler, monitoringTeams: MonitoringTeams)
}

object MaxSecondsBetweenSuccessesFormatter extends Formatter[Int] {
override val format: Option[(String, Seq[Nothing])] = Some(("format.triggerMaxErrorTime", Nil))
override val format: Option[(String, Seq[Any])] = Some(("format.triggerMaxErrorTime", Nil))
override def bind(key: String, data: Map[String, String]): Either[Seq[FormError], Int] = {
for {
maxSecondsBetweenSuccesses <- parsing(_.toInt, "Numeric value expected", Nil)(key, data)
Expand Down
8 changes: 4 additions & 4 deletions worker/src/main/scala/com/lucidchart/piezo/Worker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ object Worker {
val currentJobs: Int = scheduler.getCurrentlyExecutingJobs.size
logger.info("worker heartbeat - currently running " + currentJobs + " jobs")
}
if(reader.ready && System.in.read == -1){
logger.info("Received EOF on stdin")
runSemaphore.release()
if (reader.ready && System.in.read == -1){
logger.info("Received EOF on stdin")
runSemaphore.release()
}
}
}
}
catch {
case e: InterruptedException => logger.error("caught interruption exception: " + e)
Expand Down

0 comments on commit 836a9b4

Please sign in to comment.