Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit 9bb601c

Browse files
committed
Use DbSchemas as default property, remove hdb/tdb
1 parent df27104 commit 9bb601c

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

PyTangoArchiving/hdbpp/maintenance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,16 @@ def decimate_into_new_db(db_in, db_out, min_period = 1, min_array_period = 3,
305305
period = min_period
306306

307307
try:
308+
db_out.warning('Disabling keys on %s' % table)
308309
db_out.Query("ALTER TABLE `%s` DISABLE KEYS;" % table)
309310

310311
decimate_into_new_table(db_in,db_out,table,
311312
tbegin,tend,min_period=period, max_period = max_period,
312313
method = method,remove_nones = remove_nones,
313314
server_dec = server_dec, bunch = bunch,
314315
use_files = use_files)
315-
316+
317+
db_out.warning('Reenabling keys on %s' % table)
316318
db_out.Query("ALTER TABLE `%s` ENABLE KEYS;" % table)
317319

318320
done.append(table)

PyTangoArchiving/schemas.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ def load(k,tango='',prop='',logger=None):
134134
schemas = prop or tangodb.get_property('PyTangoArchiving',
135135
['DbSchemas','Schemas'])
136136

137-
pname = 'DbSchemas' if 'DbSchemas' in schemas else 'Schemas'
138-
schemas = schemas.get(pname,[])
137+
schemas = schemas.get('DbSchemas',[])
138+
if not schemas:
139+
schemas = schemas.get('Schemas', []) or []
139140

140141
if not schemas:
141-
schemas = ['tdb','hdb']
142+
schemas = ['hdbpp']
142143
tangodb.put_property('PyTangoArchiving',{'DbSchemas':schemas})
143144

144145
#print('Loading %s from tango@%s ... ' % (pname, tangodb.get_db_host()))

0 commit comments

Comments
 (0)