Skip to content

Improve tasks management - #197

Merged
Leo-Marbehan merged 10 commits into
mainfrom
feature/dyamic-task-time-allocation
Oct 28, 2025
Merged

Leo-Marbehan merged 10 commits into
mainfrom
feature/dyamic-task-time-allocation

Conversation

@Leo-Marbehan

@Leo-Marbehan Leo-Marbehan commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator

Improve tasks management

To do

  • Make an environment variable out of the MAX_STATES_EXTRACTION_CONCURRENT_TASKS variable.
  • Update the documentation for both environment variables.
  • Fix lint.

Modifications

  • Increase task allocation time while paused or loading states.
  • Add the DEBUG_TASKS environment variable to enable debugging of tasks in the client.
  • Move the state retrieval login in SimulationService.
  • Update the server side of the state retrieval to include more information used by the parallel tasks mechanism.
  • Change tasks to have one task per state instead of one task for all states (to allow parallelism).
  • Fetch new states more often :
    • Fetch new states as soon as we receive the previous one (instead of after it has been processed),
    • Stop fetching when more than MAX_STATES_EXTRACTION_CONCURRENT_TASKS are currently being processed (10 by default).
  • Keep track of the extract state tasks and dynamically change the priority to process the closest to the visualization time first.
  • Add tests to ensure that the priority update is working and update some configuration files.

@Leo-Marbehan Leo-Marbehan self-assigned this Oct 7, 2025
@Leo-Marbehan

Copy link
Copy Markdown
Collaborator Author

I'll deploy a test version later to avoid having two concurrent features at a time being deployed.

Comment thread multimodal-ui/src/app/interfaces/state.model.ts Outdated
Comment thread multimodal-ui/src/app/services/simulation.service.ts

@pamun1 pamun1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good overall. However, I noticed a potential logic bug in how the task priority is determined. Please take a look at my comments for more details.

@Leo-Marbehan
Leo-Marbehan requested a review from pamun1 October 11, 2025 21:56

@pamun1 pamun1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the modifications. You’ve resolved many issues related to task priority. That's great! However, I believe there is still a minor problem with the condition for selecting the most urgent task. Please see my comment for more details.

@Leo-Marbehan Leo-Marbehan linked an issue Oct 18, 2025 that may be closed by this pull request
3 tasks
@Leo-Marbehan
Leo-Marbehan requested a review from pamun1 October 18, 2025 22:21
@Leo-Marbehan
Leo-Marbehan force-pushed the feature/dyamic-task-time-allocation branch from ecd41ea to ce44f29 Compare October 19, 2025 15:57
@Leo-Marbehan Leo-Marbehan mentioned this pull request Oct 19, 2025
1 task

@pamun1 pamun1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes. Everything looks fine to me now.

@Leo-Marbehan
Leo-Marbehan force-pushed the feature/dyamic-task-time-allocation branch from 426313f to eb88fa9 Compare October 28, 2025 20:45
@Leo-Marbehan
Leo-Marbehan merged commit 81dd519 into main Oct 28, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip animations steps when paused or state missing

2 participants