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

Stats #241

Merged
merged 19 commits into from
Dec 20, 2023
Merged

Stats #241

merged 19 commits into from
Dec 20, 2023

Conversation

mitya52
Copy link
Member

@mitya52 mitya52 commented Dec 7, 2023

  • stats code moved here
  • sqlalchemy as DB backend
  • docker compose file to run refact and postgres images

self_hosting_machinery/dashboard_service/utils.py Outdated Show resolved Hide resolved
self._session: Optional[Session] = None
while True:
try:
with DisableLogger():
Copy link
Member

Choose a reason for hiding this comment

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

What the different between Cassandra and PG here? Cassandra has models too, and there is while True loop for connection too? I don't understand... In cloud version we will need cassandra's keyspaces for teams. Does PG have that?

Copy link
Member Author

Choose a reason for hiding this comment

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

keyspaces are designed for another purposes
using keyspaces for "team dbs" is a huge design mistake imo
anyway I went back to using cassandra as db

image: smallcloud/refact_self_hosting:latest
volumes:
- perm_storage:/perm_storage
nginx:
Copy link
Member

Choose a reason for hiding this comment

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

why did u delete nginx, but didn't delete nginx.conf?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see any nginx config in repo

mitya52 and others added 4 commits December 8, 2023 16:32
* fake_tele_data -> mock_tele_data
* showing tele results from the beginning of this year
@valaises
Copy link
Contributor

valaises commented Dec 10, 2023

@mitya52
webgui won't start without a database. Is it expected?

@valaises valaises requested a review from reymondzzzz December 10, 2023 12:57
Copy link
Contributor

@valaises valaises left a comment

Choose a reason for hiding this comment

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

seems to be working. However, it won't start with no database

@valaises
Copy link
Contributor

It works now without a database 👍
I would add a warning message to the webgui if we run it without a database, so users know no statistic is being collected.
Other than that, if there's no database, tab-stats will show you the message "unable to connect to localhost:8010". That is true, the daemon is down. But the real reason it is down -- is the absence of a database.

@valaises
Copy link
Contributor

@mitya52 issue with CAPS when sending stats:

/Users/kot/.cache/refact/telemetry/compressed/20231214-133628-net.json
to url
/stats/telemetry-basic
2023-12-14T12:36:28.514579Z ERROR refact_lsp::telemetry::basic_transmit:74: telemetry send failed: telemetry send failed: builder error: relative URL without a base

please, take a look

@mitya52
Copy link
Member Author

mitya52 commented Dec 20, 2023

cassandra instead of sqlalchemy

@mitya52 mitya52 merged commit ba636e8 into dev Dec 20, 2023
2 checks passed
@mitya52 mitya52 deleted the stats branch December 20, 2023 17:18
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.

4 participants