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

how to receive watch result #22

Closed
imapolaris opened this issue Jun 23, 2021 · 2 comments
Closed

how to receive watch result #22

imapolaris opened this issue Jun 23, 2021 · 2 comments

Comments

@imapolaris
Copy link

imapolaris commented Jun 23, 2021

i config watch:true, timeout:5.
but i dont know whether they worked.
how can i receive the long polling result?

@xuezier
Copy link
Owner

xuezier commented Jun 24, 2021

try it in beforeStart

apollo.on('config.updated', (data: IApolloReponseConfigData) => {
    // do something here
})

interface IApolloReponseConfigData {
    // '{"appId":"ums-local","cluster":"default","namespaceName":"application","configurations":{"NODE_ENV":"production"}
    appId: string;
    cluster: string;
    namespaceName: string;
    configurations: {
        [x: string]: string;
    };
    releaseKey: string;
}

@imapolaris
Copy link
Author

try it in beforeStart

apollo.on('config.updated', (data: IApolloReponseConfigData) => {
    // do something here
})

interface IApolloReponseConfigData {
    // '{"appId":"ums-local","cluster":"default","namespaceName":"application","configurations":{"NODE_ENV":"production"}
    appId: string;
    cluster: string;
    namespaceName: string;
    configurations: {
        [x: string]: string;
    };
    releaseKey: string;
}

thx, it works.

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

No branches or pull requests

2 participants