TritonDataCenter / node-workflow

Task orchestration, creation and running using NodeJS
MIT License
456 stars 66 forks source link

Storage of arbitrary job properties added during task execution #158

Closed TomKaltz closed 8 years ago

TomKaltz commented 8 years ago

Is there a way to store properties that were added during execution of a task to the database?

kusor commented 8 years ago

@TomKaltz there's no such functionality, but you could store arbitrary job info from any tasks into the DB and read from there for the other tasks needing it. That's indeed the main functionality of the whole /info end-point

TomKaltz commented 8 years ago

Currently I'm using the job object to tack properties in earlier tasks that are read and used by later tasks in the chain. The properties don't get stored in the database but do get propagated through to the subsequent tasks. Is there an inherent danger to doing this? Is there a recommended way of handling this situation?

On Fri, Aug 12, 2016 at 10:09 AM, Pedro Palazón Candel < notifications@github.com> wrote:

@TomKaltz https://github.com/TomKaltz there's no such functionality, but you could store arbitrary job info from any tasks into the DB and read from there for the other tasks needing it. That's indeed the main functionality of the whole /info end-point

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/joyent/node-workflow/issues/158#issuecomment-239456132, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0_IRQ5HctQQ6V0H5Q-2bEbIkXwXGEMks5qfH6PgaJpZM4JjG8c .

kusor commented 8 years ago

@TomKaltz no danger at all. That's exactly how we use it from every triton project at Joyent.

TomKaltz commented 8 years ago

info() is append-only correct? I would have to come up with my own semantics for retrieving my stored attributes?

On Fri, Aug 12, 2016 at 10:26 AM, Pedro Palazón Candel < notifications@github.com> wrote:

@TomKaltz https://github.com/TomKaltz no danger at all. That's exactly how we use it from every triton project at Joyent.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/joyent/node-workflow/issues/158#issuecomment-239460735, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0_Ia5F81UnS0elJQ5yE8vhfBOm8cu5ks5qfIKBgaJpZM4JjG8c .

kusor commented 8 years ago

Yeah, that's it