Closed D0nPiano closed 2 years ago
Note to self: look at
https://django-postgres-extra.readthedocs.io/en/master/conflict_handling.html
for upsert functionality.
@D0nPiano I made some changes to your branch here, to hopefully make this more production-ready. The most important change, I'm using external_id
(which should be unique) to ensure items are not duplicated.
django-postgres-extra
to be able to update or ignore on conflictoverride=true
to overwrite=true
errors
response item.Example response:
{
"liveuamap": {
"detail": "Refresh completed",
"errors": {"exceptions": [], "total": 0},
"overwrite": "true",
"processed": 3,
}
}
Please take a look.
Description
This is not meant to be merged (like this at least), but a proof of concept for refreshing with an extra url
/refresh
.refresh/?override
Limitations:
Checklist
pip install pre-commit && pre-commit install
), and ranblack
on my code.