Skip to content

Commit

Permalink
Disabling metadata timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bskjon committed Nov 6, 2024
1 parent b6ee215 commit 48d1eec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import java.util.*

val metadataTimeoutMinutes: Int = System.getenv("METADATA_TIMEOUT")?.toIntOrNull() ?: 10
val metadataTimeoutMinutes: Int = System.getenv("METADATA_TIMEOUT")?.toIntOrNull() ?: 0


@Service
Expand Down Expand Up @@ -55,6 +55,9 @@ class MetadataWaitOrDefaultTaskListener() : CoordinatorEventListener() {
* This one gets special treatment, since it will only produce a timeout it does not need to use the incoming event
*/
override fun onEventsReceived(incomingEvent: ConsumableEvent<Event>, events: List<Event>) {
if (metadataTimeoutMinutes <= 0) {
return
}
val hasReadBaseInfo = events.any { it.eventType == Events.EventMediaReadBaseInfoPerformed && it.isSuccessful() }
val hasMetadataSearched = events.any { it.eventType == Events.EventMediaMetadataSearchPerformed }
val hasPollerForMetadataEvent = waitingProcessesForMeta.containsKey(incomingEvent.metadata().referenceId)
Expand Down

This file was deleted.

0 comments on commit 48d1eec

Please sign in to comment.