Comments (3)
After some digging, found the info() function of the vm context. Very nice! This needs to be added to documentation.
from node-workflow.
@TomKaltz note that the info
property of jobs is intended to be used by external APIs w/o access to the job itself.
Within a task, you have access to the whole job object, so you can use whatever the identifiers you need to attach any additional properties to the job itself.
However, when a task of a workflow performs a call to a remote API, which in turn may need to perform an operation which may consist of either several steps or a long time period, it's desirable to have a way for that remote API to provided some feedback of the progress of the operation taking place (name of remote step happening, percentage of task completed ...). That way, the user trying to get up2date information about the workflow execution don't need to wait until the task is completely finished to get access to such info.
As you can see, it's intended to be used through HTTP requests to the end-point /jobs/:job_uuid/info
, and it's documented as part of the HTTP API and intentionally not documented as part of internal workflow docs.
Has sense?
from node-workflow.
But when my task controls the external process (a spawned executable) is it acceptable to use info()
to store progress data for the front-end user to query while the job is in-progress?
My use case is video transcoding where my task spawns an external ffmpeg process to convert a video file.
This does work for me but I want to know if I'm missing some unintended consequence of using info(progressInfo)
in this way
from node-workflow.
Related Issues (20)
- node-gyp rebuild / dtrace-provider 0.2.8 fail under node 0.12.7 (osx 10.10.4) HOT 8
- backend.updateJobProperty VS _updateJobProperty (in combination with node-workflow-pg-backend)
- Gitter channel for discussion? HOT 2
- backend.updateWorkflow() strips chain and onerror function bodies HOT 2
- Task runner does not appear to handle retry of tasks consistently on timeout HOT 6
- feature request: pluggable task-runner
- Task exception, not able to shut down runner HOT 1
- error when referencing same task in multiple chains of a workflow HOT 1
- allowing use of require() in tasks HOT 3
- is this been maintained? HOT 2
- node-workflow does not include the Error JavaScript builtin constructor in tasks' sandboxes HOT 1
- Storage of arbitrary job properties added during task execution HOT 5
- How to integrate with Meteor? HOT 1
- [ Question ] Multiple Runners Managing Job Queue
- Implement Joins
- package.json repository does not point to Joyent
- Add Buffer class and [set|clear]Immediate to wf-runner sandbox HOT 3
- node gyp rebuild for [email protected] fails with Node 8.11.3
- Is this still alive HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-workflow.