hastic-zzz / hastic-server

Hastic data management server for analyzing patterns and anomalies from Grafana
GNU General Public License v3.0
330 stars 23 forks source link

some analytics_service refactoring #926

Open jonyrock opened 3 years ago

jonyrock commented 3 years ago

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