write lock change to debug
This commit is contained in:
+2
-2
@@ -137,7 +137,7 @@ func processed(db *sql.DB, t telegram) {
|
||||
result, err := stmt.Exec(t.id)
|
||||
checkDbErr(err, "error in update telegram status")
|
||||
id, _ := result.RowsAffected()
|
||||
Log.Infof("[%n] telegram update : %b", id, id > 0)
|
||||
Log.Infof("[%s] telegram update : %s", id, id > 0)
|
||||
isWriting = false
|
||||
Log.Info("release lock")
|
||||
tx.Commit()
|
||||
@@ -156,7 +156,7 @@ func countTelegram() int64 {
|
||||
|
||||
func getWriteLock() {
|
||||
count := 0
|
||||
Log.Infof("write lock : %b", isWriting)
|
||||
Log.Debugf("write lock : %s", isWriting)
|
||||
for isWriting && count < 10 {
|
||||
Log.Info("waiting for write ")
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
Reference in New Issue
Block a user