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

The IsAlive flag still works incorrectly #2200

Closed
pavsenin opened this issue Jan 14, 2022 · 0 comments · Fixed by #2213
Closed

The IsAlive flag still works incorrectly #2200

pavsenin opened this issue Jan 14, 2022 · 0 comments · Fixed by #2213
Labels
bug Issues related to defects and incorrect/unexpected feature behavior

Comments

@pavsenin
Copy link

pavsenin commented Jan 14, 2022

Describe the bug
The same behavior as in these issue: #2092

The api-handler code:

const healthCheck = async (req, res) => {
    try {
        const statuses = await Promise.all(
            appConfig.readModels.map(async (readModel) => {
                const status = await req.resolve.executeQuery.status({
                    modelName:            readModel.name,
                    includeRuntimeStatus: true,
                });

                return {
                    readModelName: readModel.name,
                    isAlive:       status.isAlive,
                    errors:        JSON.stringify(status.errors)
                };
            }));

        const deadReadModels = statuses.filter(({ isAlive }) => !isAlive);

        await res.json(deadReadModels);
    }
    catch (error) {
    }
};

The example notification:

[12:15 AM] ReadModelsHealthCheck

Dead read models in TestCafe Dashboard (Deployment: pggf0c)

Builds null
Runs null


<https://teams.microsoft.com/l/message/19:[email protected]/1641935743611?tenantId=e4d60396-9352-4ae8-b84c-e69244584fa4&groupId=c3abb0f3-231c-4d87-b5a3-44925dc1d075&parentMessageId=1641935743611&teamName=TestCafe&channelName=Dashboard Monitoring&amp;createdTime=1641935743611>

  • ReSolve Version 0.33.6
@timbset timbset added the bug Issues related to defects and incorrect/unexpected feature behavior label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to defects and incorrect/unexpected feature behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants