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