CleanService wakes up in 24h intervals; it unsets the expiry date and sets Reserved status to Available, if the previous expiration date is after the current time, as specified in CleanService.js#34.
The UPDATE statement could be extended to include a different comment (including the expiry date which is being unset) and an updated modified_at timestamp, so we know when the service actually ran, and based on which expiration date it acted upon.
See the following example from the audit table:
CleanService wakes up in 24h intervals; it unsets the expiry date and sets
Reserved
status toAvailable
, if the previous expiration date is after the current time, as specified in CleanService.js#34.The
UPDATE
statement could be extended to include a different comment (including the expiry date which is being unset) and an updatedmodified_at
timestamp, so we know when the service actually ran, and based on which expiration date it acted upon.