Closed dolsysmith closed 3 years ago
Instead of saving errors to the SQL db, keep an in-memory cache and clear daily (along with the appointments table). If Access Services wants to be notified, they could be included on an email logging the error the first time it occurs.
When users register whose Alma accounts lack barcodes (as happens in some circumstances for new users), or who register with an invalid GWID (as occurs through typos, etc.), PP registration will fail, so the app skips those users. But as long as their LibCal appointment remains active, the app will keep looking them up in Alma, using API resources unnecessarily and triggering errors messages (which currently generate multiple emails).
Proposed solution: add a table to the SQLite db to cache certain types of errors affecting user account. On the first occurrence of such an error, add the user to this table, and on future calls, ignore any user in the table. Clear the table every 24 hours.