Minor changes
This commit is contained in:
parent
8b8a073216
commit
5a50c986f4
@ -2,6 +2,7 @@ package no.iktdev.mediaprocessing.coordinator.tasksV2.implementations
|
|||||||
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import mu.KotlinLogging
|
import mu.KotlinLogging
|
||||||
|
import no.iktdev.eventi.data.referenceId
|
||||||
import no.iktdev.mediaprocessing.coordinator.CoordinatorEventListener
|
import no.iktdev.mediaprocessing.coordinator.CoordinatorEventListener
|
||||||
import no.iktdev.mediaprocessing.shared.common.contract.Events
|
import no.iktdev.mediaprocessing.shared.common.contract.Events
|
||||||
import no.iktdev.mediaprocessing.shared.common.contract.ProcessType
|
import no.iktdev.mediaprocessing.shared.common.contract.ProcessType
|
||||||
@ -20,8 +21,10 @@ abstract class WorkTaskListener: CoordinatorEventListener() {
|
|||||||
val startEvent = events.find { it.eventType == Events.ProcessStarted }?.az<MediaProcessStartEvent>()
|
val startEvent = events.find { it.eventType == Events.ProcessStarted }?.az<MediaProcessStartEvent>()
|
||||||
val startType = startEvent?.data?.type
|
val startType = startEvent?.data?.type
|
||||||
if (startType == null) {
|
if (startType == null) {
|
||||||
log.error { "Start event not found. Requiring permitt event" }
|
log.error { "Start event not found on ${incomingEvent.referenceId()}. Requiring permit event" }
|
||||||
log.error { Gson().toJson(events) }
|
try {
|
||||||
|
log.error { Gson().toJson(startEvent) }
|
||||||
|
} catch (e: Exception) {}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return if (incomingEvent.eventType == Events.WorkProceedPermitted) {
|
return if (incomingEvent.eventType == Events.WorkProceedPermitted) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user