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

Creating a single file in /etc/openhab/rules generates two “Loading model” messages #3006

Closed
dilyanpalauzov opened this issue Jun 18, 2022 · 2 comments
Labels
bug An unexpected problem or unintended behavior of the Core duplicate

Comments

@dilyanpalauzov
Copy link
Contributor

When I move a file to /etc/openhab/rules, openhab logs:

2022-06-18 09:14:39.605 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'system_started.rules'
2022-06-18 09:14:40.799 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'system_started.rules'

The file has not existed in the destination, before I copied it.

The problem report is, that the above log message is emitted twice, but it shall appear only once.

@wborn
Copy link
Member

wborn commented Jun 18, 2022

It's probably because the WatchService receives 2 events from the OS native implementation whenever a file is created.
#3004 might improve this because it uses a library which can prevent handling such duplicate events.

See: /~https://github.com/gmethvin/directory-watcher#configuration

@J-N-K
Copy link
Member

J-N-K commented Jun 18, 2022

Duplicate of #671

@J-N-K J-N-K marked this as a duplicate of #671 Jun 18, 2022
@J-N-K J-N-K closed this as completed Jun 18, 2022
@J-N-K J-N-K added bug An unexpected problem or unintended behavior of the Core duplicate labels Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core duplicate
Projects
None yet
Development

No branches or pull requests

3 participants