Skip to content

Commit 8eb17fa

Browse files
fix 415 bg
1 parent 096a3bb commit 8eb17fa

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#### Breaking changes
88

99
- `pio job-status` has been replaced by `pio jobs status`.
10+
- changed `/unit_api/jobs/stop` from using query params to json body.
1011

1112
#### Bug fixes
1213

@@ -15,7 +16,7 @@
1516
- Images ship with DAC43608 library (missed the previous OS jump!)
1617
- Improvements to "Updating your model" on first boot.
1718
- Fix /pioreactor page crashing if a worker is inactive in the experiment.
18-
19+
- Fixed clock syncing on the cluster
1920

2021
### 25.11.19
2122

core/pioreactor/web/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ def get_clocktime(pioreactor_unit: str) -> DelayedResponseReturnValue:
402402
@api_bp.route("/system/utc_clock", methods=["POST"])
403403
def set_clocktime() -> DelayedResponseReturnValue:
404404
# first update the leader:
405-
task1 = tasks.multicast_post("/unit_api/system/utc_clock", [get_leader_hostname()], request.get_json())
405+
task1 = tasks.multicast_post(
406+
"/unit_api/system/utc_clock", [get_leader_hostname()], json=request.get_json()
407+
)
406408
task1.get(blocking=True, timeout=20)
407409

408410
# then tell the workers to update to leader's value (via chrony)

core/pioreactor/web/unit_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def get_clock_time():
177177
@unit_api_bp.route("/system/utc_clock", methods=["PATCH", "POST"])
178178
def set_clock_time() -> DelayedResponseReturnValue: # type: ignore[return]
179179
if HOSTNAME == get_leader_hostname():
180-
if request.json:
180+
if request.get_json(silent=True): # don't throw 415
181181
data = request.json
182182
new_time = data.get("utc_clock_time")
183183
if not new_time:

0 commit comments

Comments
 (0)