문제

I might be missing something really obvious here, but the documentation available for using Node with Iron Worker is still quite limited.

So I've created my worker just fine, but I can't figure out what happens to the payload once it's been passed to the task. Is there a variable or a function passed to the exec file which allows me to get to the payload object?

Hope someone can help.

도움이 되었습니까?

해결책

Payload available as a file inside the task, Usually in json format but it's not strictly required. See this helper: https://github.com/iron-io/iron_worker_ruby_ng/blob/master/lib/iron_worker_ng/code/runtime/node.rb#L19

This code in master branch but not yet released, so you could copy contents of the file & use it.

example: https://github.com/thousandsofthem/workers/tree/master/node-0.10

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top