-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster initial poll for script responses #13097
Comments
Scripts have always been run as background tasks. The reason for the change in polling is this PR that changed the script result page to use HTMX. As can be seen here, it just polls every 5 seconds: The old system had a backoff timer, so for each request the interval would increase by 1 second until the interval was 10 seconds. Not sure if that's possible with HTMX, but the timer could probably be lowered regardless. |
Thanks. Doc suggests Alternatively, since the template has P.S. There appears to be the same issue for reports |
* adds faster polling for scripts and reports #13097 * changes as per review
NetBox version
v3.5.4
Feature type
Change to existing functionality
Proposed functionality
One of the downsides of scripts now being run as background tasks, with the results being polled, is that even a trivial script takes 5 seconds to produce a response.
e.g. even a simple script like this, still takes 5 seconds before its result is shown in the UI:
I propose that either:
Some sort of COMET / long-poll / server-sent event would clearly be a better solution, so that the result is returned as soon as it's available, but that would more work to implement.
Use case
When scripts are being used to automate data entry tasks, a 5 second delay on every form submission is long enough to become annoying quickly.
Database changes
None
External dependencies
None
The text was updated successfully, but these errors were encountered: