rsconnect-python
rsconnect-python copied to clipboard
connect: use the public /v1/tasks/{id} endpoint
Intent
The v0 task is still returned by the v0 deploy endpoint.
-
poll-wait is an integer, not a float, and is used to configure the long-poll task requests against the Connect server.
-
task_get() calls /v1/tasks/{id}. It takes first and wait arguments, indicating the starting point for requested output and the duration for long-poll requests.
-
wait_for_task() does no sleeping, but asks task_get() to perform a long-poll with its wait argument.
-
output_task_log() sends every output line to the log callback. It previously used data abut the last-line to determine when to send lines, but that is unnecessary, as wait_for_task() requests only new lines from task_get().
-
RSConnectExecutor.delete_runtime_cache() returns its delete result and task for easier testing. It no longer stores state on the object.
fixes #608
Type of Change
- [ ] Bug Fix
- [ ] New Feature
- [ ] Breaking Change
Approach
Automated Tests
Directions for Reviewers
- deploy any content and confirm that the output is shown.
- delete runtime caches and confirm that the output is shown.
- queue and run any content rebuild and confirm that the output is shown.
Checklist
- [x] I have updated CHANGELOG.md to cover notable changes.
- [x] I have updated all related GitHub issues to reflect their current state.