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

Reload fields depends on config even when config updated in another node #451

Merged
merged 1 commit into from Jun 10, 2019

Conversation

otofune
Copy link
Member

@otofune otofune commented Jun 6, 2019

Overview

#8 was resolved by #435. But it doesn't include reloading some instances that depends on config.
This PR adds it.

@sotarok sotarok temporarily deployed to crowi-dev-pr-451 June 6, 2019 10:29 Inactive
if (channel !== this.configPubSubChannel) return
const { pubSubId, config } = JSON.parse(message)
if (pubSubId === this.pubSubId) return
this.config = config
await Promise.all([this.setupSlack(), this.setupMailer()])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[note] I thought that it's bit difficult to detect what instances to reload by difference from current config. Also it will confuse someone reading this.
This is why of adding this only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I checked that there are no problem to call setupSlack and setupMailer always.

Copy link
Member

@lightnet328 lightnet328 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@otofune otofune merged commit 55504d2 into wip-v1.7.7 Jun 10, 2019
@otofune otofune deleted the reload-when-config-chenge-notified-by-pubsub branch June 10, 2019 08:11
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

3 participants