-
Notifications
You must be signed in to change notification settings - Fork 3
add: Tasking service #47
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
base: add/round-service
Are you sure you want to change the base?
Conversation
…subnet-api into add/tasking-service
…subnet-api into add/tasking-service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a combined round and tasking service by consolidating tests and updating service interfaces.
- Removed the previous round service tests.
- Added new tests covering both round and tasking services.
- Updated TaskingService and configuration to use "maxTasksPerSubnet" for task sampling.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
test/round-service.test.js | Removed old tests for round service. |
test/round-and-tasking-service.test.js | Added comprehensive tests for both round and tasking functionalities. |
lib/tasking-service.js | Updated task sampler typedef, registration, and task generation/storage logic. |
lib/config.js | Updated tasking configuration to use maxTasksPerSubnet instead of maxTasks. |
Files not reviewed (1)
- migrations/004.do.checker-subnet-tasks.sql: Language not supported
checkRoundIntervalMs: 200 | ||
} | ||
|
||
describe('round and tasking service', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to merge round and tasking service tasks together as splitting them up causes flaky tests due to concurrent database reads writes.
…subnet-api into add/tasking-service
This reverts commit e4dd5df.
…subnet-api into add/tasking-service
…subnet-api into add/tasking-service
…subnet-api into add/tasking-service
This pull request includes changes to the tasking service, focusing on adding task generation logic and adding tests. The implementing task generation logic, creating a new database table for subnet tasks, and adding tests for the round and tasking services.
Tasking service is triggered on the round creation. Once the service is triggered it will call all registered task sampling functions for each subnet, generate tasks for each of them and save them to the database.
Tasks definition is saved in the database using
JSONB
types which enables us to have dynamic task definitions for different subnets.Change log:
migrations/004.do.checker-subnet-tasks.sql
: Created a new tablechecker_subnet_tasks
to store tasks for subnets.lib/tasking-service.js
: UpdatedTaskSamplingFn
andTaskingConfig
typedefs, added logic for registering task samplers, generating tasks for subnets, and storing tasks in the database. [1] [2]lib/config.js
: ChangedmaxTasks
tomaxTasksPerSubnet
in thetaskingServiceConfig
.test/round-and-tasking-service.test.js
: Added comprehensive tests for the round and tasking services, including tests for round creation, round transitions, task sampler registration, and task generation.test/round-service.test.js
: Removed redundant tests for the round service, as they are now included inround-and-tasking-service.test.js
.Closes:
Related to: