Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduced new synchronization types in conddb tools #11980

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions CondCore/Utilities/python/conddblib.py
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
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