Skip to content

Commit

Permalink
Merge pull request #11980 from ggovi/conddbV2-new-synchronization-typ…
Browse files Browse the repository at this point in the history
…es-utilities

Introduced new synchronization types in conddb tools
  • Loading branch information
cmsbuild committed Oct 26, 2015
2 parents ab32f3e + 7ecde91 commit 80be511
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions CondCore/Utilities/python/conddblib.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,15 @@ def hash(data):
/absolute/path/to/file.db === sqlite:////absolute/path/to/file.db
'''


class Synchronization(Enum):
offline = 'Offline'
hlt = 'HLT'
prompt = 'Prompt'

any = 'any'
validation = 'validation'
mc = 'mc'
runmc = 'runmc'
hlt = 'hlt'
express = 'express'
prompt = 'prompt'
pcl = 'pcl'

class TimeType(Enum):
run = 'Run'
Expand Down
4 changes: 2 additions & 2 deletions CondCore/Utilities/scripts/conddb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def connect(args, init=False, read_only=True, schema='cms_conditions'):
conn2url = conddb.make_url(args.destdb)
if conn2url.drivername == 'sqlite' and not os.path.exists(args.destdb):
init = True
conn2 = _connect(conn2url, init, args.verbose, False, args.force)
conn2 = _connect(args.destdb, init, args.verbose, False, args.force)
return conn1, conn2

return _connect( args.db, init, args.verbose, read_only, args.force)
Expand Down Expand Up @@ -925,7 +925,7 @@ def _copy_tag(args, session1, session2, first, second, fromIOV=None, toIOV=None,
if timeMap and not fromIOV and not toIOV:
fromIOV = timeMap['start'][ tag['time_type'].lower().strip() ]
toIOV = timeMap['stop'] [ tag['time_type'].lower().strip() ]

session2.add(conddb.Tag(**tag))

# Get the closest smaller IOV than the given starting point (args.from),
Expand Down

0 comments on commit 80be511

Please sign in to comment.