-
Notifications
You must be signed in to change notification settings - Fork 56
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
Simplify the operation handling code #2880
Labels
refactoring
Developer value
Comments
16 tasks
14 tasks
#2909 eliminated the biggest problems with operation handling, but there are still some big improvements to do: Follow-up tasks:
Additional checks:
|
13 tasks
11 tasks
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your refactoring request related to a problem? Please describe.
As originally described in the Further Comments section in the PR about using the File Transfer Service for log and config operations, the current architecture of the C8y mapper actor adds unnecessary complexity to the operation handling code, by:
This:
It concerns mainly the interaction between downloader and uploader actors, where every time we need to download/upload from within the operation, we need to send the request and return, in order not to block handling of other things.
Describe the solution you'd like
The preferred solution would be to handle the entirety of an operation in a module dedicated to that operation, without returning, saving state, and relying on other parts of the code to continue the execution. We should be able to run the future that handles the operation concurrently, as that's what async/await should allow.
This was already done for
c8y_firmware_manager
(#2600), now the aim would be to do something similar withc8y_mapper_ext
and its operation handling.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: