Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

some analytics_service refactoring #926

Open
jonyrock opened this issue Jul 12, 2020 · 0 comments
Open

some analytics_service refactoring #926

jonyrock opened this issue Jul 12, 2020 · 0 comments

Comments

@jonyrock
Copy link
Contributor

jonyrock commented Jul 12, 2020

I thing we should remove this:
https://github.com/hastic/hastic-server/blob/765cfc7710b2384959bcc11dcac173dd0ab05d68/server/src/services/analytics_service.ts#L207

I found hardcoded port here:
https://github.com/hastic/hastic-server/blob/765cfc7710b2384959bcc11dcac173dd0ab05d68/server/src/services/analytics_service.ts#L79

I find it suspicious that we resolve our promise here:
https://github.com/hastic/hastic-server/blob/765cfc7710b2384959bcc11dcac173dd0ab05d68/server/src/services/analytics_service.ts#L147

we don't guarantee that task will be sent in the same order (because we just place task to the scheduler, but don't know when scheduler will take it):
https://github.com/hastic/hastic-server/blob/765cfc7710b2384959bcc11dcac173dd0ab05d68/server/src/services/analytics_service.ts#L163
.. and we don't await this send function promise

@jonyrock jonyrock changed the title better await in analytics_service better await in analytics_service and refactoring Jul 12, 2020
@jonyrock jonyrock changed the title better await in analytics_service and refactoring some analytics_service refactoring Jul 12, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant