-
Notifications
You must be signed in to change notification settings - Fork 3
Description
In OVL: a visitor badge printer is driven by a custom printer server made from an RPi. The printer server makes calls to the PHP script "OVLvisitorbadges.php". This PHP script queries the OVL table in the Facility Database for a list of up to 5 unprinted visitor registrations and then marks those registrations as "printed" in the database. This architecture makes it possible to install more than one printer/print server in the system. Having multiple printers might become desirable as visitor volumes increase and higher throughput and reliability become needed.
The current script "OVLvisitorbadges.php" performs the database query for unprinted records first and then marks the records as printed. These operations are atomic. If more than one instance of the script is being run at any given time, it is possible for multiple instances to return the same data and thus to have multiple visitor badges printed for any one record. A (small?) modification to this script that read locks this table until the relevant records are marked "printed" would eliminate this issue and allow multiple print servers to be supported.