Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top