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

Scheduled function to actively export paid orders daily #80

Open
leomp12 opened this issue Oct 26, 2021 · 1 comment
Open

Scheduled function to actively export paid orders daily #80

leomp12 opened this issue Oct 26, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@leomp12
Copy link
Member

leomp12 commented Oct 26, 2021

Is your feature request related to a problem? Please describe.
Persistent errors with big orders queue and tons of events in short time, some orders (especially those that are created already paid) are not being properly exported, this commit will help but we may need a fallback solution.

Describe the solution you'd like

  1. Successful order exports should be saved to local Firestore database such as done with imported ones here;
  2. A daily scheduled function such as https://github.com/ecomplus/app-tiny-erp/blob/master/functions/index.js#L150-L154 to perform:
    1. Fetch Store API orders filtering by paid financial status updated on current day;
    2. Check each order (by number or ID) on Firestore and export the not found (not exported yet) ones.

Describe alternatives you've considered
Refactor adding parsing all events to Pub/Sub and queuing properly (painful).

Additional context
N/A

@leomp12 leomp12 added enhancement New feature or request help wanted Extra attention is needed labels Oct 26, 2021
@leomp12 leomp12 assigned wisley7l and unassigned wisley7l Jun 23, 2022
@leomp12
Copy link
Member Author

leomp12 commented Jun 23, 2022

@wisley7l pra um dia desses se pá? 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants