MCPcopy
hub / github.com/github/gh-ost / createFlagFiles

Method createFlagFiles

go/logic/migrator.go:434–444  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

432}
433
434func (mgtr *Migrator) createFlagFiles() (err error) {
435 if mgtr.migrationContext.PostponeCutOverFlagFile != "" {
436 if !base.FileExists(mgtr.migrationContext.PostponeCutOverFlagFile) {
437 if err := base.TouchFile(mgtr.migrationContext.PostponeCutOverFlagFile); err != nil {
438 return mgtr.migrationContext.Log.Errorf("--postpone-cut-over-flag-file indicated by gh-ost is unable to create said file: %s", err.Error())
439 }
440 mgtr.migrationContext.Log.Infof("Created postpone-cut-over-flag-file: %s", mgtr.migrationContext.PostponeCutOverFlagFile)
441 }
442 }
443 return nil
444}
445
446// checkAbort returns abort error if migration was aborted
447func (mgtr *Migrator) checkAbort() error {

Callers 3

MigrateMethod · 0.95
RevertMethod · 0.95

Calls 5

FileExistsFunction · 0.92
TouchFileFunction · 0.92
ErrorfMethod · 0.65
ErrorMethod · 0.65
InfofMethod · 0.65

Tested by 1