Replies: 3 comments 14 replies
-
Sounds like you are using sqlite as a database. There is no way to prevent locking with sqlite because it only supports one connection data at a time (it is file based). |
Beta Was this translation helpful? Give feedback.
-
You can export this data in two ways:
As raised above, the sqlite database backend does not handle parallel requests well at all. That being said, can you please share the entire error message you are seeing?
Yes. Go to the notifications centre and select "Mark all as read": |
Beta Was this translation helpful? Give feedback.
-
Is there any documentation how to migrate database? I did find only https://docs.inventree.org/en/latest/start/migrate/#migrating-data-to-newer-version which basically covers the
as @matmair said. And it did work fine but it did not transfer my API tokens. Thats not a big issue, but I wonder if there is anything else that does not get transferred? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been playing with a little project, mainly for fun and learning new tools. JLCPCB now offers that I can have a "stock" of components at their factory for PCB assembly. From InvenTree point of view it is more like an external stock location. As far as I know there is no API to download the stock status/actions, but I can manually export XLSX file with current stock count.
So I've decided to write a small tool to take this file and update a specified dedicated stock location with it. It works relatively fine, but there are some questions I need to consider and decide. I.e. should I delete the stock that is not in the XLSX file? Should I try to detect stock movement somehow or just "delete all and import all",.... However, there are a few things I would like to discuss.
First is the most important and it relates to the API. If I do a lot of parallel calls, I get an HTTP 500 error database locked. I really think that this is not a good practice. a) the error gets logged and clutters the system server log, b) it should differ from other internal errors.
Of course, the simplest solution seems to be to serialize the calls, but that is not a solution. It only means that I do not block myself but if the instance would be a little more used, I could run into another users/api calls locking the database.
Also related question, is there a way how to delete 100 notifications at once (from the Bell UI?).
Another related question is about the external locations. Would it be possible to have them distinguished in the stock overview? For example, instead of a 78, show something like 30+48 ? The idea behind this is that it would not mix with parts I have at hand.
Beta Was this translation helpful? Give feedback.
All reactions