add lock log
This commit is contained in:
@@ -116,6 +116,7 @@ func LoadUnprocessed() {
|
||||
|
||||
func processed(t telegram) {
|
||||
db := getDb()
|
||||
log.Println("get lock")
|
||||
getWriteLock()
|
||||
stmt, _ := db.Prepare(update)
|
||||
result, err := stmt.Exec(t.id)
|
||||
@@ -123,6 +124,7 @@ func processed(t telegram) {
|
||||
id, _ := result.RowsAffected()
|
||||
log.Println(t.id, " telegram update : ", id)
|
||||
isWriting = false
|
||||
log.Println("release lock")
|
||||
}
|
||||
|
||||
func countTelegram() int64 {
|
||||
|
||||
Reference in New Issue
Block a user