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

Geolocation architecture is not optimal #946

Closed
josancamon19 opened this issue Sep 30, 2024 · 1 comment
Closed

Geolocation architecture is not optimal #946

josancamon19 opened this issue Sep 30, 2024 · 1 comment
Assignees

Comments

@josancamon19
Copy link
Contributor

Instead of doing

  Future<void> _updateProcessingMemory() async {
    if (processingMemoryId == null) {
      return;
    }

    debugPrint("update processing memory");
    // Update info likes geolocation
    UpdateProcessingMemoryResponse? result = await updateProcessingMemoryServer(
      id: processingMemoryId!,
      geolocation: geolocation,
      emotionalFeedback: GrowthbookUtil().isOmiFeedbackEnabled(),
    );
    if (result?.result == null) {
      debugPrint("Can not update processing memory, result null");
    }
  }

For geolocation, we should send it to the server, not every 30 seconds, but every 5 to 10 minutes (The less the better), handling geolocation as a single entity, and then during memory processing, we should retrieve the geolocation that matches the creation timestamp.
As for omi emotional feedback, is not needed for now (disabled), but once is used again, also keep it as a backend entity.

Default geolocation to ipapi.co/json

@josancamon19 josancamon19 converted this from a draft issue Sep 30, 2024
@beastoin
Copy link
Collaborator

beastoin commented Oct 1, 2024

gotcha!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants