[med-svn] [Git][med-team/gnumed-server][upstream] New upstream version 22.27
Andreas Tille (@tille)
gitlab at salsa.debian.org
Wed Dec 27 12:06:16 GMT 2023
Andreas Tille pushed to branch upstream at Debian Med / gnumed-server
Commits:
d8066ef4 by Andreas Tille at 2023-12-27T12:22:27+01:00
New upstream version 22.27
- - - - -
7 changed files:
- server/doc/schema/gnumed-entire_schema.html
- + server/gm-backup_and_zip_database
- + server/gm-backup_and_zip_database.service
- + server/gm-backup_and_zip_database.timer
- server/pycommon/gmCfg.py
- server/pycommon/gmLog2.py
- server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
Changes:
=====================================
server/doc/schema/gnumed-entire_schema.html
=====================================
@@ -112,7 +112,7 @@
<body>
<!-- Primary Index -->
-<p><br><br>Dumped on 2023-11-18</p>
+<p><br><br>Dumped on 2023-12-25</p>
<h1><a name="index">Index of database - gnumed_v22</a></h1>
<ul>
=====================================
server/gm-backup_and_zip_database
=====================================
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# take care of daily backup of GNUmed database
+# to be run by cron/anacron/systemd.timer/...
+#
+# install into /usr/sbin/
+
+# backup data
+DOBACKUP=/usr/sbin/gm-backup
+
+# compress and sign backup(s)
+ZIPSIGN=/usr/sbin/gm-zip+sign_backups
+
+if [ -x "$DOBACKUP" ] ; then
+ $DOBACKUP
+fi
+
+if [ -x "$ZIPSIGN" ] ; then
+ $ZIPSIGN
+fi
=====================================
server/gm-backup_and_zip_database.service
=====================================
@@ -0,0 +1,7 @@
+[Unit]
+Description="GNUmed database backup service"
+Requires=gm-backup_and_zip_database.timer
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/gm-backup_and_zip_database
=====================================
server/gm-backup_and_zip_database.timer
=====================================
@@ -0,0 +1,12 @@
+[Unit]
+Description="GNUmed database backup timer"
+
+[Timer]
+Unit=gm-backup_and_zip_database.service
+# once daily
+OnCalendar=*-*-* 00:00:01
+# fire once immediately upon timer activation if would have fired during power down
+Persistent=yes
+
+[Install]
+WantedBy=timers.target
=====================================
server/pycommon/gmCfg.py
=====================================
@@ -314,6 +314,7 @@ limit 1""" % where_clause
_log.warning('option definition for [%s] not in config database' % alias)
return None
return rows[0][0]
+
#----------------------------
def set(self, workplace = None, cookie = None, option = None, value = None):
"""Set (insert or update) option value in database.
@@ -361,7 +362,7 @@ limit 1""" % where_clause
rows, idx = gmPG2.run_rw_queries(link_obj=rw_conn, queries=[{'cmd': cmd, 'args': args}], return_data=True)
result = rows[0][0]
except Exception:
- _log.exception('cannot set option')
+ _log.exception('cannot set option: [%s] = <%s>::<%s>' % (option, opt_value, sql_type_cast))
result = False
rw_conn.commit() # will rollback if transaction failed
=====================================
server/pycommon/gmLog2.py
=====================================
@@ -68,6 +68,7 @@ import calendar
_logfile_name = None
_logfile = None
+_logfile_name_printed = False
# table used for cooking non-printables
@@ -240,6 +241,15 @@ def log_step(level:int=logging.DEBUG, message:str=None, restart:bool=False):
logger.log(level, '%s', __current_log_step)
__current_log_step += 1
+#---------------------------------------------------------------
+def print_logfile_name():
+ global _logfile_name_printed
+ if _logfile_name_printed:
+ return
+
+ print('Log file:', _logfile_name)
+ _logfile_name_printed = True
+
#===============================================================
# internal API
#===============================================================
@@ -359,7 +369,7 @@ if __name__ == '__main__':
#-----------------------------------------------------------
def test():
- print(_logfile_name)
+ print_logfile_name()
log_step(message = 'testing')
logger = logging.getLogger('gmLog2.test')
log_step()
=====================================
server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
=====================================
@@ -17,17 +17,24 @@ INSERT INTO dem.message_inbox (
) VALUES (
(select pk from dem.staff where db_user = 'any-doc'),
(select pk_type from dem.v_inbox_item_type where type = 'memo' and category = 'administrative'),
- 'Release Notes for GNUmed 1.8.16 (database v22.26)',
- 'GNUmed 1.8.16 Release Notes:
+ 'Release Notes for GNUmed 1.8.17 (database v22.27)',
+ 'GNUmed 1.8.17 Release Notes:
- 1.8.16
+ 1.8.17
-FIX: SQL plugin: exception on faulty query
-FIX: meds plugin: grid selection constant names
-FIX: gtk: do not abort on sizer flags inconsistencies in production code
+FIX: patient search exception
+FIX: OOo startup exception
+FIX: placeholders today/date_of_birth/name parsing if no format given
+FIX: logging of invalid form templates
+FIX: logging of invalid address data
-IMPROVED: plugin PACS: layout
+IMPROVED: EMR browser: link document review dlg from document nodes
+IMPROVED: configuration: logging of set-option failures
+
+ 22.27
+
+NEW: add systemd .timer/.service files for scheduling database backup
');
-- --------------------------------------------------------------
-select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.26 at 1.8.16');
+select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.27 at 1.8.17');
View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/commit/d8066ef46b6eca4ace36df57ca921ec135a7ec9c
--
View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/commit/d8066ef46b6eca4ace36df57ca921ec135a7ec9c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231227/13d43753/attachment-0001.htm>
More information about the debian-med-commit
mailing list