Skip to content

Commit

Permalink
Quickstart tweaks (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
daabr authored Aug 20, 2024
1 parent d31681e commit bf8468a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions quickstart/autokitteh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,3 @@ project:
data:
path: trigger_path
call: program.py:on_http_get
- name: http_get_with_param
connection: http_conn
event_type: get
data:
path: iterations/{iters}
call: program.py:on_http_get
4 changes: 2 additions & 2 deletions quickstart/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
def on_http_get(event):
print(f"Received {event.data.method} request")

iterations = int(event.data.params.get("iters", "0"))
iterations = int(event.data.url.query.get("iterations", "0"))
for i in range(iterations):
print("Loop iteration: %d of %d" % (i + 1, iterations))
print(f"Loop iteration: {i + 1} of {iterations}")
time.sleep(FIVE_SECONDS)

print(f"Finished processing {event.data.method} request")

0 comments on commit bf8468a

Please sign in to comment.