Skip to content

Commit 426015b

Browse files
authored
Combined compile/ upload function (#89)
* Update function * Add flush to update task
1 parent eb30f89 commit 426015b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tasks/func.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,18 @@ def invoke(ctx, user, func, input_data=None, mpi=None, graph=False):
130130
print("Success:\n{}".format(response.text))
131131

132132

133+
@task
134+
def update(ctx, user, func, clean=False, debug=False, native=False):
135+
"""
136+
Combined compile, upload, flush
137+
"""
138+
compile(ctx, user, func, clean=clean)
139+
140+
upload(ctx, user, func)
141+
142+
flush(ctx)
143+
144+
133145
@task
134146
def flush(ctx):
135147
"""
@@ -142,7 +154,7 @@ def flush(ctx):
142154
data = {"type": FAABRIC_MSG_TYPE_FLUSH}
143155
response = requests.post(url, json=data, headers=headers)
144156

145-
print("Response {}: {}".format(response.status_code, response.text))
157+
print("Flush response {}: {}".format(response.status_code, response.text))
146158

147159

148160
@task

0 commit comments

Comments
 (0)