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

Provide the observable Watchdog#state property #4703

Closed
ma2ciek opened this issue Jul 31, 2019 · 2 comments · Fixed by ckeditor/ckeditor5-watchdog#16
Closed

Provide the observable Watchdog#state property #4703

ma2ciek opened this issue Jul 31, 2019 · 2 comments · Fixed by ckeditor/ckeditor5-watchdog#16
Assignees
Labels
package:watchdog type:task This issue reports a chore (non-production change) and other types of "todos".
Milestone

Comments

@ma2ciek
Copy link
Contributor

ma2ciek commented Jul 31, 2019

When a watchdog reaches a state when it shouldn't restart the editor, it should fire an event to provide a way to mark this editor as crashed (e.g. by switching it to the read-only state). Now it's impossible to achieve it without using non-public API.

@ma2ciek ma2ciek self-assigned this Jul 31, 2019
@ma2ciek

This comment has been minimized.

@pjasiun
Copy link

pjasiun commented Jul 31, 2019

We talked that it would be better to introduce observable watchdog.state property which will extend editors property, and can change this way:

initializing
ready
crashed
initializing
ready
crashed
initializing
ready
crashed
crashedPernamently

Even if crashed state will immediately switch to initializing or crashedPernamently it will let the user to listen on such state change. It will also let them check the watchdog state at any moment they need.

@ma2ciek ma2ciek changed the title Provide the crash event Provide the observable Watchdog#state property Jul 31, 2019
pjasiun referenced this issue in ckeditor/ckeditor5-watchdog Aug 2, 2019
Feature: Introduced the observable `Watchdog#state` property. Introduced the `minimumNonErrorTimePeriod` configuration which defaults to 5 seconds and will be used to prevent infinite restart loops while allowing a larger number of random crashes as long as they do not happen too often. Renamed `waitingTime` configuration option to `saveInterval`. Closes #7. Closes #15.

BREAKING CHANGE: Renamed `waitingTime` configuration option to `saveInterval`.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-watchdog Oct 9, 2019
@mlewand mlewand added this to the iteration 26 milestone Oct 9, 2019
@mlewand mlewand added type:task This issue reports a chore (non-production change) and other types of "todos". package:watchdog labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:watchdog type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants