Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Fixed Queries for demozoo exiting after one record.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Mar 31, 2024
1 parent 18e0522 commit 0411913
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/demozoo/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ func (r *Request) Query(db *sql.DB, w io.Writer, id string) error {
return nil
}

// Queries parses all new proofs.
// Overwrite will replace existing assets such as images.
// All parses every Demozoo entry, not just records waiting for approval.
// Queries parses all new Demozoo submissions.
//
// Request.Overwrite will replace existing assets such as images.
//
// Request.All parses every Demozoo entry, not just records waiting for approval.
func (r Request) Queries(db *sql.DB, w io.Writer) error { //nolint:cyclop,funlen
if db == nil {
return database.ErrDB
Expand Down Expand Up @@ -111,7 +113,7 @@ func (r Request) Queries(db *sql.DB, w io.Writer) error { //nolint:cyclop,funlen
continue
}
if st.Total == 0 {
break
continue
}
if err := rec.save(db, w); err != nil {
r.Logger.Errorf("queries save: %s", err)
Expand Down

0 comments on commit 0411913

Please sign in to comment.