\kiosk_checker

Class to checks the kiosks to make sure they are still alive.

Checks the Galleries DB, Kiosks table.

Summary

Methods
Properties
Constants
__construct()
query()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
send_email()
connect_db()
$dbh
$time
N/A

Properties

$dbh

$dbh : 

Type

$time

$time : 

Type

Methods

__construct()

__construct(  $minutes_in_the_past = 5) 

Constructor. Connect to the Galleries DB, and generate a timestamp.

Parameters

$minutes_in_the_past

query()

query() 

Check if any of the kiosks are down. Query the Galleries DB and check the keep alive timestamp.

Compare this to the $time instance variable. If the keep alive is more than (default) 5 minutes old, send an email.

send_email()

send_email(  $kiosk_info) 

Send an email notifying the admin that kiosks are down.

Parameters

$kiosk_info

connect_db()

connect_db() : mixed

Connects to the Galleries DB

Returns

mixed —

$dbh A handle on the Galleries DB