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

Commit

Permalink
Slowed down mass query.
Browse files Browse the repository at this point in the history
Stopped ping of pouet that may conflict with dz request.
  • Loading branch information
bengarrett committed Mar 31, 2024
1 parent 0411913 commit 6997cf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/demozoo/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (r Request) Queries(db *sql.DB, w io.Writer) error { //nolint:cyclop,funlen
if update := rec.check(w); !update {
continue
}
time.Sleep(1 * time.Second)
if err := rec.parseAPI(db, w, r.Config, st, r.Overwrite, storage); err != nil {
r.Logger.Errorf("queries parseapi: %s", err)
if errors.Is(err, context.DeadlineExceeded) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/demozoo/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,9 @@ func (r *Record) parseAPI(db *sql.DB, w io.Writer, cfg conf.Config, st Stat, ove
if !ok {
return ErrParseAPI
}
if err := r.pingPouet(&api); err != nil {
return fmt.Errorf("%s%w", "parse api: ", err)
}
// if err := r.pingPouet(&api); err != nil {
// return fmt.Errorf("%s%w", "parse api: ", err)
// }
r.FilePath = filepath.Join(storage, r.UUID)
if err := r.Download(w, &api, st, overwrite); err != nil {
return fmt.Errorf("%s%w", "parse api download: ", err)
Expand Down

0 comments on commit 6997cf5

Please sign in to comment.