Comments (7)
@dimgiagos44 Did you find any solution to this issue?
In my situation:
// Define provide definition of the workflow
func Define(flow *faasflow.Workflow, context *faasflow.Context) (err error) {
dag := flow.Dag()
dag.Node("n1").Apply("func1")
dag.Node("n2").Apply("func2")
dag.Edge("n1", "n2")
return
}
When I try to invoke this flow as:
$ echo "test" | faas-cli invoke async-chain
I get nothing on the terminal.
from faas-flow.
You can try storing the result in a db instance through the second function and persist it there. E.g., Redis, Minio, etc
@Abhishekghosh1998
from faas-flow.
inside the last function, write some code to store the result in a remote storage like Minio
from faas-flow.
@dimgiagos44 I tried your hack.
The log for the function:
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Version: 0.9.12 SHA: 5d4cadcaf595f3d3d213e08cdd38a310c5bb3066
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Forking: ./handler, arguments: []
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Started logging: stderr from function.
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Started logging: stdout from function.
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Watchdog mode: http fprocess: "./handler"
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Timeouts: read: 30s write: 30s hard: 30s health: 30s
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Listening on port: 8080
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Writing lock-file to: /tmp/.lock
2023-10-14T04:40:53Z 2023/10/14 04:40:53 Metrics listening on port: 8081
2023-10-14T04:40:53Z 2023/10/14 04:40:53 stderr: 2023/10/14 04:40:53 Using default state store (consul)
2023-10-14T04:40:53Z 2023/10/14 04:40:53 stderr: 2023/10/14 04:40:53 Using default data store (minio)
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stderr: 2023/10/14 04:41:10 Executing flow 10
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Created
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: StateStore overridden DataStore overridden[Request `ckl1npnerlqs71prejd0`] DAG state initiated at StateStore
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Executing node 0_1_n1
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Executing function `func1`
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Completed execution of Node 0_1_n1
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Intermediate result from Node 0_1_n1 to 0_2_n2 stored as 0_1_n1--0_2_n2
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] performing request for Node 0_2_n2, indegree count is 1
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: http://gateway.openfaas:8080/async-function/async-chainckl1npnerlqs71prejd0
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: &{POST http://gateway.openfaas:8080/async-function/async-chain/flow/ckl1npnerlqs71prejd0/forward HTTP/1.1 1 1 map[Accept:[application/json] Content-Type:[application/json] X-Faas-Flow-Callback-Url:[] X-Faas-Flow-Reqid:[ckl1npnerlqs71prejd0]] {0xc0002870b0} 0x675c10 270 [] false gateway.openfaas:8080 map[] map[] <nil> map[] <nil> <nil> <nil> 0xc0000b4010}
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Request submitted for Node 0_2_n2
2023-10-14T04:41:10Z 2023/10/14 04:41:10 POST / - 200 OK - ContentLength: 0B (0.0965s)
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stderr: 2023/10/14 04:41:10 Partially executing flow 10, for id ckl1npnerlqs71prejd0
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Received
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: StateStore overridden DataStore overridden[Request `ckl1npnerlqs71prejd0`] Intermediate result from Node 0_1_n1 to Node 0_2_n2 retrieved from 0_1_n1--0_2_n2
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Executing node 0_2_n2
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Executing function `func2`
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Completed execution of Node 0_2_n2
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Completed successfully
2023-10-14T04:41:10Z 2023/10/14 04:41:10 stdout: [Request `ckl1npnerlqs71prejd0`] Calling completion handler
2023-10-14T04:41:10Z 2023/10/14 04:41:10 POST /flow/ckl1npnerlqs71prejd0/forward - 200 OK - ContentLength: 91B (0.0444s)
I see it is completed, but where do we retrieve the final result (of 91B here) from?
from faas-flow.
@dimgiagos44 Without changing the second function...? Does FaaS-Flow provide the same facility? Like it internally writes to some database or storage system, which we can later retrieve?
from faas-flow.
Yes exactly, internally write to some db...its a hacky approach but it is what it is
from faas-flow.
internally write to some db
@dimgiagos44 Did not get it... :(
Like I mean, I do not want to modify my function code for function1 or function2. Does FaaS-Flow allow us to get the final output without attaching some callback...
from faas-flow.
Related Issues (20)
- add CutDag(id string) and Reverse() sdk.Dag funcs HOT 6
- How do you think about dapr as data store?
- are you thinking of visual based programming? HOT 2
- Allow ability to create aggregators as a function
- Change documentation and configuration to Kubernets default
- Faas-flow Infra should deploy the whole Faas-flow stack HOT 1
- Keep the default flow configuration in the Dockerfile of Template HOT 1
- Make Consul and Minio as default StateStore and DataStore
- build failed HOT 2
- Failed to init flow HOT 1
- Multiple-node Dag's execution fails HOT 3
- Flow execution time measurement
- Parallel execution speed up HOT 4
- faas build the demo case yml failed
- Function output pipe into next function HOT 2
- Cannot use context.Set in faas-flow pipeline. HOT 1
- Fass flow has an inncorrect flow name HOT 2
- Docker images problem HOT 3
- Is there some function examples? 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 faas-flow.