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

Update database before content store #583

Merged
merged 2 commits into from
Jan 18, 2023
Merged

Conversation

paulrobertlloyd
Copy link
Collaborator

@paulrobertlloyd paulrobertlloyd commented Jan 17, 2023

Currently:

  • post/media data is created/updated
  • content is uploaded/published to the content store
  • post/media item is created/updated in the database

This means data creation/manipulation is happening in two places. It also means content gets uploaded before the database has been queried, so if a database operation fails, the 2 fall out of sync.

This PR updates the media and Micropub endpoints so that post/media items are created/updated, and the database operation occurs before any file is published or uploaded.

@paulrobertlloyd paulrobertlloyd added enhancement New feature or request code quality Making things easier to understand plugin-endpoint Endpoint plug-in labels Jan 17, 2023
@paulrobertlloyd paulrobertlloyd force-pushed the 575-database-file-sync branch 4 times, most recently from a9e2303 to c178b8e Compare January 17, 2023 23:52
@paulrobertlloyd paulrobertlloyd marked this pull request as ready for review January 18, 2023 00:03
@paulrobertlloyd paulrobertlloyd merged commit c6a5fbb into main Jan 18, 2023
@paulrobertlloyd paulrobertlloyd deleted the 575-database-file-sync branch January 18, 2023 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Making things easier to understand enhancement New feature or request plugin-endpoint Endpoint plug-in
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant