migrateGangaObjects(repository,
migration_control=None)
| source code
|
This function transforms older versions of GangaObjects to the current
versions. The migration is made in place over repository, i.e. it does
not affect the job registry. Therefore the job registry has to be
rescanned after the migration. One may use jobs._impl._scan_repository()
to do so. Only completely converted jobs will be migrated. No jobs in
"incomplete" state will be saved in the repository. IMPORTANT:
Once migrated the plugins may not be backward compatible. Arguments:
repository - current job repository (can be accessed as
jobs._impl._repository) migration_control - migration control object that
allows/denies migration of particular plugins (an instance of
MigrationControl class) If this argument is ommitted the migration will
require interactive input.
Example of usage within a script: from
Ganga.GPIDev.Streamers.MigrationControl import MigrationControl
migration_control = MigrationControl() migration_control.allow() #allows
migration of all possible plugins
migrateGangaObjects(jobs._impl.repository, migration_control)
jobs._impl._scan_repository()
|