heya - I'm an onyx n00b, and am working on a poc using the app template - but when I look through the examples project there's no usage of the api bits that are laid out in the template code - for example, there's no use of add-task
. So my question is, which approach is preferred, and if it's better to use the add-task
and similar functions, where can I learn more about how they're typically used?
also, this ns seems to contain the means to get a reference to the channel created internally (which it the thing I couldn't figure out how to do based on the template code)
but it doesn't seem to be documented in the API docs http://www.onyxplatform.org/docs/api/0.13.x/
oops the ns I'm referring to: https://github.com/onyx-platform/onyx/blob/0.13.x/src/onyx/plugin/core_async.cljc
so the root of my confusion here is that the code seems to take care of creating the output channel, but the examples and docs indicate that the channel should be created and injected via a lifecycle
How do I find out if a job is pending because there aren't enough peers? rq/job-state
says the job is running, but the log indicates it hasn't received enough peers to start.
and the onyx.tasks.core-async
helper functions seem to follow the first approach - so that leaves me wondering how to get a handle on the output channel
to me it looks like that would be via the onyx.plugin.core-async/get-channel
function, but I don't find any documentation for that
so I guess I'll just try it all out and see what happens 🙂
ok, I found usable intel in the test from the template - so I'm good for now with get-core-async-channels
and take-segments!
.
but the docs are missing some key guidance, and the whole onyx.plugin.core-async
ns
Never mind - looks like I should be using onyx.api/job-state
Moving along, things start up for me, in a with-test-env
context, but things hang, then eventually I start seeing exceptions like this:
org.apache.zookeeper.KeeperException$BadVersionException: KeeperErrorCode = BadVersion for /onyx/1/epoch/0d51c634-b33d-90d5-33df-aa6f76c1978a/-1
code: -103
path: "/onyx/1/epoch/0d51c634-b33d-90d5-33df-aa6f76c1978a/-1"