|
|
|
@@ -2471,20 +2471,9 @@ func GetBlockChainUnSuccessRepos() ([]*Repository, error) { |
|
|
|
} |
|
|
|
|
|
|
|
func (repo *Repository) UpdateBlockChain() error { |
|
|
|
sess := x.NewSession() |
|
|
|
defer sess.Close() |
|
|
|
if err := sess.Begin(); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
if _, err := sess.Exec("UPDATE `repository` SET block_chain_status = ?, contract_address=? WHERE id = ?", repo.BlockChainStatus, repo.ContractAddress, repo.ID); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
if err := sess.Commit(); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
return nil |
|
|
|
_, err := x.Exec("UPDATE `repository` SET block_chain_status = ?, contract_address=? WHERE id = ?", repo.BlockChainStatus, repo.ContractAddress, repo.ID) |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
func (repo *Repository) IncreaseCloneCnt() { |
|
|
|
|