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

Use Sanity to create a queue & log of sync operations #173

Open
14 tasks
good-idea opened this issue Jun 24, 2021 · 0 comments
Open
14 tasks

Use Sanity to create a queue & log of sync operations #173

good-idea opened this issue Jun 24, 2021 · 0 comments

Comments

@good-idea
Copy link
Owner

sync-utils

  • Create a singleton "SaneShopify" document
  • Add an operations array
  • Pushed to the queue
  • A sane-shopify instance (on the server or in the dashboard) "claims" the top item on the queue and processes it
    • Updates the state/progress of that sync every 1 second or so
  • Find a way to detect aborted/incomplete syncs (if a ping doesn't happen every 1s? What if there is only one service active and it fails?)
  • Record linked documents in the operation object (to use the operations list as a log of syncs)
  • add a lastSyncedAt date field to products & collections

server

  • Create webhook that looks at the queue (to allow for cron jobs to pick up aborted syncs)

shopify-plugin

  • Display a list of current syncs in the Desk Tool
  • Update the icon when a sync is in progress
  • If a sync is active and a manual sync is made, show its status as "pending"
  • Highlight any errored syncs and allow for retry
  • Add a debug mode that prints log messages to an overlay (so people don't need to use dev tools if they aren't familiar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant