ke4roh / vertx-engine

An execution engine for processing things, based on vertx
Apache License 2.0
1 stars 2 forks source link

Fix engine timeouts #40

Closed LightGuard closed 5 years ago

LightGuard commented 5 years ago

Currently the timeouts for the engine do not work. The engine should bail after five seconds, but they currently do not function correctly.

I'm not seeing the code right now though.

ke4roh commented 5 years ago

https://github.com/ke4roh/vertx-engine/blob/master/src/main/java/com/redhat/vertx/pipeline/AbstractStep.java#L77

LightGuard commented 5 years ago

Okay, there's the code, but it doesn't actually seem to be working, or am I missing something?

ke4roh commented 5 years ago

Nope, that's it. I don't know why that doesn't bail after no new info has come in for 5 seconds.

ke4roh commented 5 years ago

To address the hanging processes, the section needs to be able to assemble and evaluate a list of steps and their statuses (whether they're executing, completed, or errored or blocked).

To establish that list, create a new class, StepExecutor responsible for managing the execution of a single step in a single document, for knowing that step's execution state, and for managing events related to its execution.

Rather than having blocked steps listen for the change themselves, have the Executor retry them when polled by the Section after a change so that the Section can identify when all steps have finished.

From the Section perspective, the job is to execute all steps, and follow completion events. When one happens, poll all remaining steps to see if they're complete or blocked. When they are all complete or blocked, then the Section is complete.