LP#
1492793: teach Clark Kent to set the Pg app name
Clark Kent can now also use the application_name
setting in the relevant sections of opensrf.xml to
set the Pg application name.
To test:
[1] Apply the patch, restarting opensrf.settings, and
start Clark.
[2] Run a report that will take at least a minute to
finish. While it is running, query the pg_stat_activity
table. There should be at least one row where the
application_name column is set to 'Clark Kent (reports)'.
[3] Note that since the master Clark process opens a database
connection, checks whether there are any reports to run,
then immediately closes the connection, it's unlikely that
you'll catch a 'Clark Kent (state)' connection when
querying pg_stat_activity.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>