updated random value to double precision float
This commit is contained in:
parent
41c0eb5c49
commit
7f36e99443
3 changed files with 4 additions and 4 deletions
|
|
@ -13,11 +13,11 @@ type HostRow struct {
|
|||
HtmlTitle string
|
||||
IframeAllowed bool
|
||||
BestIconS3Key string
|
||||
RandomOrder float32
|
||||
RandomOrder float64
|
||||
}
|
||||
|
||||
// fetchHostsPage gets a page of hosts with titles, ordered by random_order for shuffled bundles.
|
||||
func fetchHostsPage(ctx context.Context, pool *pgxpool.Pool, lastRandom float32, limit int) ([]HostRow, error) {
|
||||
func fetchHostsPage(ctx context.Context, pool *pgxpool.Pool, lastRandom float64, limit int) ([]HostRow, error) {
|
||||
rows, err := pool.Query(ctx, `
|
||||
SELECT id, hostname, protocol, html_title, COALESCE(iframe_allowed, true), COALESCE(best_icon_s3_key, ''), random_order
|
||||
FROM hosts
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ func main() {
|
|||
|
||||
bundleCount := 0
|
||||
var totalBytes int64
|
||||
var lastRandom float32 = -1
|
||||
var lastRandom float64 = -1
|
||||
pageSize := cfg.EntriesPerBundle * 50 // fetch 50 bundles worth at a time
|
||||
var entryBuf []BundleEntry
|
||||
hostsProcessed := 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue