diff options
author | raylu <raylu@mixpanel.com> | 2011-08-08 00:29:57 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-08-08 00:29:57 -0700 |
commit | 0164e2515ae5ff6cedf37c4ae8344eae4d1b9b94 (patch) | |
tree | 5c2b7ebd5349ebc6fe1be7059073f8fe19249d21 /updates.go | |
parent | e6b9900d3ba394eba04b84a8a01be644d43d642c (diff) | |
download | audioaxis-0164e2515ae5ff6cedf37c4ae8344eae4d1b9b94.tar.xz |
dbpool!
Diffstat (limited to 'updates.go')
-rw-r--r-- | updates.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -38,7 +38,13 @@ func addUpdate(pid int, action uint, song *Song) { tailUpdates[pid] = update } -func getUpdates(pid int, timestamp int64) *Update { +func getUpdates(id string, timestamp int64) *Update { + db := <-dbPool + pid := getpid(db, id) + dbPool <- db + if pid == -1 { + return nil + } pup, ok := headUpdates[pid] if !ok { return nil |