cwctl.py
branch3.5
changeset 3198 d2f48d30e73e
parent 3184 613064b49331
parent 3190 75cf006babe4
child 3199 fc63b80ec979
child 3486 ea6bf6f9ba0c
equal deleted inserted replaced
3192:93c8fdcd943e 3198:d2f48d30e73e
   656             return
   656             return
   657         for cube, fromversion, toversion in toupgrade:
   657         for cube, fromversion, toversion in toupgrade:
   658             print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)
   658             print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)
   659         # only stop once we're sure we have something to do
   659         # only stop once we're sure we have something to do
   660         if not (cwcfg.mode == 'dev' or self.config.nostartstop):
   660         if not (cwcfg.mode == 'dev' or self.config.nostartstop):
   661             StopCommand().stop_instance(appid)
   661             StopInstanceCommand().stop_instance(appid)
   662         # run cubicweb/componants migration scripts
   662         # run cubicweb/componants migration scripts
   663         mih.migrate(vcconf, reversed(toupgrade), self.config)
   663         mih.migrate(vcconf, reversed(toupgrade), self.config)
   664         # rewrite main configuration file
   664         # rewrite main configuration file
   665         mih.rewrite_configuration()
   665         mih.rewrite_configuration()
   666         # handle i18n upgrade:
   666         # handle i18n upgrade:
   679                 return
   679                 return
   680         mih.shutdown()
   680         mih.shutdown()
   681         print
   681         print
   682         print '-> instance migrated.'
   682         print '-> instance migrated.'
   683         if not (cwcfg.mode == 'dev' or self.config.nostartstop):
   683         if not (cwcfg.mode == 'dev' or self.config.nostartstop):
   684             StartCommand().start_instance(appid)
   684             StartInstanceCommand().start_instance(appid)
   685         print
   685         print
   686 
   686 
   687 
   687 
   688 class ShellCommand(Command):
   688 class ShellCommand(Command):
   689     """Run an interactive migration shell. This is a python shell with
   689     """Run an interactive migration shell. This is a python shell with