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

ms2/mqtt in memory storage #429

Merged
merged 27 commits into from
Dec 10, 2024
Merged

ms2/mqtt in memory storage #429

merged 27 commits into from
Dec 10, 2024

Conversation

FelipeTrost
Copy link
Contributor

Summary

The basic idea is to maintain a subscription to an MQTT topic and keep collecting data from it.
I implemented a basic structure to do this, any suggestions are welcome.

For now some of the values are hardcoded, but I intend to change that in the future.

This comment has been minimized.

Copy link

github-actions bot commented Dec 9, 2024

CLOUDRUN ACTIONS

✅ Successfully created Preview Deployment.

https://pr-429---ms-server-staging-c4f6qdpj7q-ew.a.run.app

Copy link
Contributor

@jjoderis jjoderis left a comment

Choose a reason for hiding this comment

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

Looks good I think. I don't have a better idea to handle this.


if (staleAfter) {
clearTimeout(collectedData!.clearInterval);
collectedData!.clearInterval = setTimeout(() => clearCollectedData(topic), staleAfter);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the name clearInterval correct if it is not actually a recurring occurrence

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeahp, you're right, that was an old name I forgot to change.
I'll rename it in an upcoming PR.

@FelipeTrost FelipeTrost merged commit 6f52bb1 into main Dec 10, 2024
15 checks passed
@FelipeTrost FelipeTrost deleted the ms2/mqtt-in-memory-storage branch December 10, 2024 15:52
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.

2 participants