Actually fix postgres scraping this time
Cette révision appartient à :
Parent
054df5f8c3
révision
630fd786ee
1 fichiers modifiés avec 2 ajouts et 1 suppressions
|
@ -57,7 +57,8 @@ func (t *Transaction) handleScrapeReply(data []byte) {
|
|||
}
|
||||
|
||||
|
||||
var pgQuery = "INSERTE INTO " + config.Conf.Models.ScrapeTableName + " (torrent_id, seeders, leechers, completed, last_scrape) VALUES ($1, $2, $3, $4, $5) ON CONFLICT UPDATE"
|
||||
var pgQuery = "INSERT INTO " + config.Conf.Models.ScrapeTableName + " (torrent_id, seeders, leechers, completed, last_scrape) VALUES ($1, $2, $3, $4, $5) "+
|
||||
"ON CONFLICT (torrent_id) DO UPDATE SET seeders=EXCLUDED.seeders, leechers=EXCLUDED.leechers, completed=EXCLUDED.completed, last_scrape=EXCLUDED.last_scrape"
|
||||
var sqliteQuery = "REPLACE INTO " + config.Conf.Models.ScrapeTableName + " (torrent_id, seeders, leechers, completed, last_scrape) VALUES (?, ?, ?, ?, ?)"
|
||||
|
||||
// Sync syncs models with database
|
||||
|
|
Référencer dans un nouveau ticket