Fork me on GitHub
#onyx
<
2018-07-05
>
mhcat18:07:09

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?

mhcat18:07:23

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)

mhcat18:07:59

but it doesn't seem to be documented in the API docs http://www.onyxplatform.org/docs/api/0.13.x/

mhcat18:07:03

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

mhcat18:07:23

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

mhcat19:07:02

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

mhcat19:07:11

so I guess I'll just try it all out and see what happens 🙂

mhcat20:07:23

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!.

mhcat20:07:53

but the docs are missing some key guidance, and the whole onyx.plugin.core-async ns

sparkofreason18:07:12

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.

sparkofreason20:07:07

Never mind - looks like I should be using onyx.api/job-state

mhcat21:07:19

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"