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

App retry system on memory creation if fails #517

Closed
josancamon19 opened this issue Aug 3, 2024 · 1 comment
Closed

App retry system on memory creation if fails #517

josancamon19 opened this issue Aug 3, 2024 · 1 comment
Assignees
Labels
flutter flutter work task

Comments

@josancamon19
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If the app fails when creating a memory:

debugPrint('processTranscriptContent');
  if (transcript.isEmpty && photos.isEmpty) return null;
  // TODO: handle connection errors, or anything
  // store locally first, with a flag of send to server once the app connects again to the internet.
  CreateMemoryResponse? result = await createMemoryServer(
    startedAt: startedAt ?? DateTime.now(),
    finishedAt: finishedAt ?? DateTime.now(),
    transcriptSegments: transcriptSegments,
    geolocation: geolocation,
    photos: photos,
  );
  if (result == null) return null;
  ServerMemory? memory = result.memory;
  if (memory == null) return null;

  // EVENTS
  webhookOnMemoryCreatedCall(memory).then((s) {
    if (s.isNotEmpty) createNotification(title: 'Developer: On Memory Created', body: s, notificationId: 11);
  });

We should have a local list of memories failed to create, should be stored as discarded temporarilly, with some uuid4 and some default data, and when the user opens the app again we should attempt to synchornize with the server by calling create memory for each one, before reading the list of memories available.

@josancamon19 josancamon19 self-assigned this Aug 6, 2024
@josancamon19 josancamon19 changed the title App retry system on memory creation if fails ($250) App retry system on memory creation if fails Aug 6, 2024
@josancamon19
Copy link
Contributor Author

Fixed, it's released and on main branch

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

No branches or pull requests

1 participant