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

[basicprofiles] Add new "Flat Line" profile #18301

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

andrewfg
Copy link
Contributor

Resolves #18291

Signed-off-by: Andrew Fiddian-Green [email protected]

Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg added enhancement An enhancement or new feature for an existing add-on work in progress A PR that is not yet ready to be merged labels Feb 19, 2025
@andrewfg andrewfg requested review from jimtng and jlaur February 19, 2025 23:24
@andrewfg andrewfg self-assigned this Feb 19, 2025
@andrewfg andrewfg requested a review from J-N-K as a code owner February 19, 2025 23:24
Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg removed the work in progress A PR that is not yet ready to be merged label Feb 20, 2025
@andrewfg
Copy link
Contributor Author

andrewfg commented Feb 20, 2025

@J-N-K I have an OH Core Architecture question in relation to this PR which you can perhaps answer.

The new FlatLineProfile class implements a periodic scheduled task on an external scheduled executor service. So when a FlatLineProfile instance is released it must inform that service to cancel that task. I did this by implementing AutoCloseable in FlatLineProfile and adding a @Deactivate method in the ProfileFactory component; this calls the respective close() method(s) when the component is unloaded.

I think this is OK for an addon such as this. However OH Core does have ProfileFactory components so I wonder if we need to do the same in those cases? => WDYT?

Signed-off-by: Andrew Fiddian-Green <[email protected]>
@andrewfg andrewfg requested a review from a team February 21, 2025 14:46
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[basicprofiles] Create a new "Flat Line" profile?
1 participant