onyx

FYI: alternative Onyx :onyx: chat is at <https://gitter.im/onyx-platform/onyx> ; log can be found at <https://clojurians-log.clojureverse.org/onyx/index.html>
j0ni 2018-07-05T18:05:09.000062Z

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?

j0ni 2018-07-05T18:41:23.000303Z

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)

j0ni 2018-07-05T18:41:59.000128Z

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

j0ni 2018-07-05T18:42:27.000220Z

oops the ns I'm referring to: https://github.com/onyx-platform/onyx/blob/0.13.x/src/onyx/plugin/core_async.cljc

j0ni 2018-07-05T18:57:03.000121Z

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

sparkofreason 2018-07-05T18:58:12.000409Z

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.

j0ni 2018-07-05T18:59:23.000279Z

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

j0ni 2018-07-05T19:00:02.000262Z

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

j0ni 2018-07-05T19:00:11.000322Z

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

j0ni 2018-07-05T20:14:23.000072Z

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

j0ni 2018-07-05T20:14:53.000361Z

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

sparkofreason 2018-07-05T20:31:07.000469Z

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

j0ni 2018-07-05T21:29:19.000119Z

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"