Skip to content
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

chore: extract async task lib #1390

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

ClemDoum
Copy link
Contributor

@ClemDoum ClemDoum commented Apr 24, 2024

TODO

  • handle redisson version properly (try to remove the explicit version in datashare-app)
  • CI for datashare-tasks
  • JAR publication for datashare-tasks
  • validate naming (datashare-tasks vs. datashare-async-tasks)
  • review TODOs left in the code

PR description

This PRs extracts the asynchronous tasks logic of DS in its own package. The goal of the operation is that the package can be used by other repos than DS if they want to implement async tasks (neo4j proeject for instance).

Changes

datashare-app

Removed

  • removed async tasks logic and added a dependency on datashare-tasks

datashare-tasks

Added

  • created the datashare-tasks repo

Changed

  • replaced CancellableCallable by CancellableTask
  • renamed CanceledEvent into CancelledEvent
  • task function now take a progress which is only called with the Double progress argument. The String taskId part of the progress is forwarded inside the TaskRunnerLoop. This avoid the task implementer to possibly call progress(taskId, progress) with the wrong taskId.

Left for later

  • wrap task cancellation logic in its own function and keep track of the original exception is something goes wrong while handling task error
  • align Java and Python
  • decouple task name and object name as the current task mapping relies as the current task name mapping heavily relies on class naming and will prevent refactor/renaming/moving classes

@ClemDoum ClemDoum changed the title Save work chore: extract async task lib Apr 24, 2024
@ClemDoum ClemDoum force-pushed the feature/extract-task-lib branch 4 times, most recently from 133dd52 to 9894bb2 Compare April 29, 2024 08:19
@ClemDoum ClemDoum force-pushed the feature/extract-task-lib branch 2 times, most recently from d66f5ee to d04a921 Compare May 13, 2024 10:31
@ClemDoum ClemDoum self-assigned this May 13, 2024
@ClemDoum ClemDoum requested a review from a team May 13, 2024 10:42
@ClemDoum ClemDoum marked this pull request as ready for review May 13, 2024 10:47
@ClemDoum ClemDoum force-pushed the feature/extract-task-lib branch 3 times, most recently from 27920e4 to a9e2e33 Compare May 13, 2024 14:10
bamthomas and others added 12 commits May 14, 2024 16:19
Co-authored-by: Clément Doumouro <ClemDoum@users.noreply.github.com>
Co-authored-by: Maxime Vanza Lutonda <mvanzalu@users.noreply.github.com>
Co-authored-by: Clément Doumouro <ClemDoum@users.noreply.github.com>
    Co-authored-by: Maxime Vanza Lutonda <mvanzalu@users.noreply.github.com>
Co-authored-by: Maxime Vanza Lutonda <mvanzalu@users.noreply.github.com>
Co-authored-by: Maxime Vanza Lutonda <mvanzalu@users.noreply.github.com>
Co-authored-by: Maxime Vanza Lutonda <mvanzalu@users.noreply.github.com>
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.

None yet

2 participants