Skip to content

hawkbit-client: poll in 10s if an activity was performed#204

Open
1NFR4R3D wants to merge 3 commits intorauc:masterfrom
1NFR4R3D:feature/poll-sooner-on-action
Open

hawkbit-client: poll in 10s if an activity was performed#204
1NFR4R3D wants to merge 3 commits intorauc:masterfrom
1NFR4R3D:feature/poll-sooner-on-action

Conversation

@1NFR4R3D
Copy link
Copy Markdown

@1NFR4R3D 1NFR4R3D commented Jan 8, 2026

The function hawkbit_pull_cb in hawkbit-client.c handles only one action (download or cancellation) every time it runs.

In cases where a device has many pending actions and has a sensible poll interval, the update is delayed for a significantly long time.

For instance, if a device has 6 updates assigned to it, of which 5 are cancelled and 1 is available for download, and it has been configured to poll the server every 15 minutes, it will take one hour and 15 minutes before it starts downloading the update.

While this isn't a problem for any devices in the field and online, it is a problem for devices that are either offline for a long period, or in our case, devices that have not been deployed yet.

Duplicate: #203

@1NFR4R3D 1NFR4R3D marked this pull request as draft January 8, 2026 22:01
Check if `hawkbit_pull_cb()` performed any cancellation or download. If
it performed either, set the interval to 10s instead of the configured value.

Signed-off-by: Kanishkavikram Purohit <kpurohit@tewke.com>
@1NFR4R3D 1NFR4R3D force-pushed the feature/poll-sooner-on-action branch from 3241393 to 14eab3e Compare February 20, 2026 00:34
Expanding on commit 14eab3e, allows
overriding sleep time to a value from config file instead of the value
provided by the server.

Signed-off-by: Kanishkavikram Purohit <kpurohit@tewke.com>
@1NFR4R3D 1NFR4R3D force-pushed the feature/poll-sooner-on-action branch from 12932b3 to 6f5764f Compare February 20, 2026 02:03
@1NFR4R3D 1NFR4R3D marked this pull request as ready for review February 20, 2026 02:03
@1NFR4R3D
Copy link
Copy Markdown
Author

Added the ability to control the override based on a config value instead of hard-coding it in

@Bastian-Krause
Copy link
Copy Markdown
Member

Processing multiple actions sounds like a good enhancement.

Instead of adding another config option and polling the base resource again (which is strictly speaking against the DDI API's $.config.polling.sleep), can't we process multiple actions in a single polling interval? I'm assuming multiple actions are present in the deploymentBase response, but I haven't verified that.

@Bastian-Krause Bastian-Krause added the enhancement New feature or request label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants