]> git.parisson.com Git - telemeta-data.git/commitdiff
migration: allow to run a group of tasks
authorolivier <olivier@3bf09e05-f825-4182-b9bc-eedd7160adf0>
Thu, 11 Jun 2009 17:11:48 +0000 (17:11 +0000)
committerolivier <olivier@3bf09e05-f825-4182-b9bc-eedd7160adf0>
Thu, 11 Jun 2009 17:11:48 +0000 (17:11 +0000)
git-svn-id: http://svn.parisson.org/svn/crem@100 3bf09e05-f825-4182-b9bc-eedd7160adf0

trunk/import/migration/migrate.py

index d6d18f95919f4b04cde116001efb0bf5f2d85ad0..c7641a99b41c8e9db78fc4b05990ec2fc1c77ff1 100644 (file)
@@ -55,8 +55,11 @@ class MigrationManager(Component):
         task = None
         for t in tasks:
             if only_task:
-                if t.get_name() == only_task:
+                name = t.get_name()
+                if name == only_task or name.split(':')[0] == only_task:
                     task = t
+                else:
+                    continue
             else:
                 task = t
 
@@ -68,8 +71,6 @@ class MigrationManager(Component):
                 self.target_db.commit()
                 sys.stdout.write("\t(%.2fs)\n" % (time.time() - start))
                 done.append(task)
-                if only_task:
-                    break
 
         return done