Made coroutineDispatcher configurable
This commit is contained in:
parent
72991218d9
commit
c3cf0652b2
|
@ -23,7 +23,8 @@ import java.util.concurrent.Executors
|
|||
import kotlin.math.max
|
||||
|
||||
open class EmailsFetcher(
|
||||
protected open val eInvoiceReader: EInvoiceReader = EInvoiceReader()
|
||||
protected open val eInvoiceReader: EInvoiceReader = EInvoiceReader(),
|
||||
protected open val coroutineDispatcher: CoroutineDispatcher = Executors.newFixedThreadPool(max(24, Runtime.getRuntime().availableProcessors() * 4)).asCoroutineDispatcher()
|
||||
) {
|
||||
|
||||
protected data class MessagePart(
|
||||
|
@ -32,8 +33,6 @@ open class EmailsFetcher(
|
|||
)
|
||||
|
||||
|
||||
protected open val coroutineDispatcher = Executors.newFixedThreadPool(max(24, Runtime.getRuntime().availableProcessors() * 4)).asCoroutineDispatcher()
|
||||
|
||||
protected val log by logger()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue