FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/func/python/chain.py at main · faasm/python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
faasm
/
python
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
6
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
func
/
python
/
chain.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (24 loc) · 789 Bytes
Breadcrumbs
python
/
func
/
python
/
chain.py
Copy path
File metadata and controls
36 lines (24 loc) · 789 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from
pyfaasm
.
core
import
chain
,
await_call
def
chain_one
(
input_bytes
):
expected
=
b"1234"
print
(
"Chained 1: {} {}"
.
format
(
input_bytes
,
expected
))
if
input_bytes
!=
expected
:
exit
(
1
)
return
0
def
chain_two
(
input_bytes
):
expected
=
b"5678"
print
(
"Chained 2: {} {}"
.
format
(
input_bytes
,
expected
))
if
input_bytes
!=
expected
:
exit
(
1
)
return
0
def
faasm_main
():
print
(
"Main chaining entry point"
)
call_a
=
chain
(
chain_one
,
b"1234"
)
call_b
=
chain
(
chain_two
,
b"5678"
)
print
(
"Awaiting calls {} and {}"
.
format
(
call_a
,
call_b
))
res_a
=
await_call
(
call_a
)
res_b
=
await_call
(
call_b
)
if
res_a
!=
0
or
res_b
!=
0
:
print
(
"Chained functions failed: {} {}"
.
format
(
res_a
,
res_b
))
exit
(
1
)
return
0
Back
|
FazBrowse Home
|
New Git URL