-
Notifications
You must be signed in to change notification settings - Fork 1
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
Status check and reminders #134
Comments
These are good ideas but I think we should implement both of them in separate (python or anything else) scripts because
|
I altered the old script and implemented the congruency check https://github.com/leih-lokal/scripts/blob/master/leihlokal.py I'll add the email reminders tomorrow. One question: We now have three different points where a status is saved
Are 1) and 2) somehow updating each other automatically? Or only 2->1? Could we think about just getting rid of the flag 2) and getting the status from WC or by query? |
Ok great. We only update from 2 -> 1 because the idea was that we would edit everything from the new system and not in wordpress anymore. Also, automatically updating 1 -> 2 would require us to detect changes on WC automatically which we could only do by sending a lot of HTTP Requests all the time. I think we should not get rid of 2. because loading the status from WC everytime is very slow. Also we could not filter or search by status anymore (would take several minutes to load all states from wc). I don't understand the 3. point. We don't save another state in rental. A rental only has a rented_on and returned_on date. If the rental is active the returned_on date is 0. |
Of course we could implement a script to find items for which there are different status in wc and couchdb. But then the script could not automatically change the state because it does not know which state is correct. It could only notify the user. I think your script already does that? |
We can see which rentals have not been returned, and that gives a good indication whether the item is available or not (unless its a hammer, of which we have several) So, the item can be currently rented by someone (3), but item.status_on_website shows "available", and WC shows "unavailable". But I see, it might not be possible otherwise. for now I only check the status on the website, and whether the item is rented by someone at this point. |
As a rather larger update I want to discuss embedding
I think you once mentioned that you still would want to do this via the python CLI, am I correct? is there a reason for not doing this in the web app (besides it being a bit cumbersome to connect to IMAP/SMTP)?
Currently the python-script still relies on the excel, but I guess that could be changed easily
The text was updated successfully, but these errors were encountered: