-
Notifications
You must be signed in to change notification settings - Fork 42
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
Batch tasks submitted to dispatcher in reverse order #484
Comments
const submitTasks = React.useCallback<Required<TaskPanelProps>['submitTasks']>(
async (tasks) => {
if (!tasksApi) {
throw new Error('tasks api not available');
}
await Promise.all(tasks.map((t) => tasksApi.submitTaskTasksSubmitTaskPost(t)));
handleRefresh();
},
[tasksApi, handleRefresh],
); Since rmf does not support batch tasks, the client is submitting the requests in parallel, the order is probably a byproduct of how the browser handles scheduling of promises. If we want to change this behavior, we will have to submit tasks in sequence which will slow down the process. |
Ah I see. Thanks for explaining why this happens. Is it safe to say that the behaviour is also browser specific, ie, the same file uploaded via dashboards running on Firefox and Chrome may have different outcomes? If so we will make sure to use the same browser to upload th scenario for the demo. |
Currently batch upload is unordered, so we can assume the order may be different everytime. Because we are uploading tasks in parallel, external factors like network latency may change the order as well. |
I believe this is only fixed on the throwaway branch, it remains a question if we should port it to the main branch, use the current parallel impl or wait for open-rmf/rmf_ros2#115 to be implemented first and use actual batch task submissions rather than hacking around it on the client side. |
This can be achieved using the task scheduler now |
It seems that when a batch task file containing tasks [A, B, C] is uploaded, the dashboard submits the tasks to the dispatcher in the reverse sequence, ie, C->B->A. This causes minor inconvenience with scripting scenarios for demos.
The text was updated successfully, but these errors were encountered: