update neo-engine and refactor task stop handling #302
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes aimed at improving the task management and script execution in the
mods/tql
module, as well as updating dependencies and adding new test cases. The most important changes are summarized below:Task Management Improvements:
mods/tql/task.go
: Introduced_shouldStopListeners
to allow adding listeners that get notified when a task should stop. AddedAddShouldStopListener
method and updatedfireCircuitBreak
to notify listeners. [1] [2]Script Execution Enhancements:
mods/tql/fm_script_es6.go
: ReplacedwatchdogCleanup
mechanism with a more efficientonceInterrupt
approach for interrupting the script execution. [1] [2] [3]Dependency Updates:
go.mod
: Updatedg.yxqyang.asia/machbase/neo-engine/v8
to a newer versionv8.0.42-0.20250321110958-66bd4ea52df8
.New Test Cases:
mods/tql/fm_script_test.go
: Added a new test casejs-db-query
to verify database query execution within a script.Benchmark Updates:
test/bench_test.go
: Added new benchmark results for different CPUs and updated the benchmark functions with the latest performance data. [1] [2]