Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs a helper to load in Payload etc from within a worker #15

Open
treeder opened this issue Mar 18, 2015 · 4 comments
Open

Needs a helper to load in Payload etc from within a worker #15

treeder opened this issue Mar 18, 2015 · 4 comments
Assignees

Comments

@treeder
Copy link
Contributor

treeder commented Mar 18, 2015

Reading the -payload, -id, -config etc for easy usage rather than having user's build it themselves.

@pyeremenko
Copy link
Contributor

@treeder, how do you see this?

I think it should be io.iron.ironworker.client.helpers.WorkerParameters class which accepts String[] and provides the following getters:

  • String getDirectoryName()
  • String getEnvironment()
  • String getTaskId()
  • com.google.gson.JsonObject getPayload()
  • T getPayload(java.lang.Class classOfT)

cc @edsrzf

@treeder
Copy link
Contributor Author

treeder commented Mar 20, 2015

It should be like this: https://github.com/iron-io/iron_go/blob/master/worker/remote.go or this: https://github.com/iron-io/iron_worker_ruby/blob/master/lib/iron_worker/worker_helper.rb

Preferably user could just call something like:

String payload  = WorkerHelper.getPayload()
JsonObject payload = WorkerHelper.getPayloadJSON()
etc....

@pyeremenko
Copy link
Contributor

@treeder, please, look at this PR #17

@pyeremenko
Copy link
Contributor

Also I changed iron_worker_examples https://github.com/iron-io/iron_worker_examples/pull/100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants