consumer #2
|
@ -16,8 +16,6 @@
|
|||
|
||||
package dev.usbharu.owl.consumer
|
||||
|
||||
import dev.usbharu.dev.usbharu.owl.consumer.TaskRequest
|
||||
import dev.usbharu.dev.usbharu.owl.consumer.TaskRunner
|
||||
import dev.usbharu.owl.*
|
||||
import dev.usbharu.owl.Uuid.UUID
|
||||
import dev.usbharu.owl.common.property.PropertySerializeUtils
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package dev.usbharu.owl.consumer
|
||||
|
||||
import dev.usbharu.dev.usbharu.owl.consumer.TaskRunner
|
||||
import dev.usbharu.owl.AssignmentTaskServiceGrpcKt
|
||||
import dev.usbharu.owl.SubscribeTaskServiceGrpcKt
|
||||
import dev.usbharu.owl.TaskResultServiceGrpcKt
|
||||
|
@ -50,8 +49,7 @@ class StandaloneConsumer(
|
|||
|
||||
private val taskRunnerMap = ServiceLoader
|
||||
.load(TaskRunner::class.java)
|
||||
.associateBy { it::class.qualifiedName!! }
|
||||
.filterNot { it.key.isBlank() }
|
||||
.associateBy { it.name }
|
||||
|
||||
private val consumer = Consumer(
|
||||
subscribeStub,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dev.usbharu.dev.usbharu.owl.consumer
|
||||
package dev.usbharu.owl.consumer
|
||||
|
||||
import dev.usbharu.owl.common.property.PropertyValue
|
||||
import java.time.Instant
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dev.usbharu.dev.usbharu.owl.consumer
|
||||
package dev.usbharu.owl.consumer
|
||||
|
||||
import dev.usbharu.owl.common.property.PropertyValue
|
||||
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dev.usbharu.dev.usbharu.owl.consumer
|
||||
package dev.usbharu.owl.consumer
|
||||
|
||||
fun interface TaskRunner {
|
||||
interface TaskRunner {
|
||||
val name: String
|
||||
suspend fun run(taskRequest: TaskRequest): TaskResult
|
||||
}
|
Loading…
Reference in New Issue