Miscellaneous app cleanup (#7594)
* app cleanup * whoops, forgot a file * some minor cleanup * longer container deadline * defensive checks
Этот коммит содержится в:
@@ -85,8 +85,12 @@ func tearDownStores() {
|
||||
for _, st := range storeTypes {
|
||||
st := st
|
||||
go func() {
|
||||
st.Store.Close()
|
||||
st.Container.Stop()
|
||||
if st.Store != nil {
|
||||
st.Store.Close()
|
||||
}
|
||||
if st.Container != nil {
|
||||
st.Container.Stop()
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -312,8 +312,8 @@ func UpgradeDatabaseToVersion43(sqlStore SqlStore) {
|
||||
}
|
||||
|
||||
func UpgradeDatabaseToVersion44(sqlStore SqlStore) {
|
||||
if shouldPerformUpgrade(sqlStore, VERSION_4_3_0, VERSION_4_4_0) {
|
||||
// TODO: Uncomment following when version 4.4.0 is released
|
||||
//saveSchemaVersion(sqlStore, VERSION_4_4_0)
|
||||
}
|
||||
// TODO: Uncomment following when version 4.4.0 is released
|
||||
//if shouldPerformUpgrade(sqlStore, VERSION_4_3_0, VERSION_4_4_0) {
|
||||
// saveSchemaVersion(sqlStore, VERSION_4_4_0)
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,8 @@ func runContainer(args []string) (*RunningContainer, error) {
|
||||
}
|
||||
|
||||
func waitForPort(port string) error {
|
||||
for i := 0; i < 120; i++ {
|
||||
deadline := time.Now().Add(time.Minute * 10)
|
||||
for time.Now().Before(deadline) {
|
||||
conn, err := net.DialTimeout("tcp", "127.0.0.1:"+port, time.Minute)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Ссылка в новой задаче
Block a user