Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAGE_SLEEP_MIN being ignored? #510

Closed
daviderickson opened this issue Oct 12, 2020 · 6 comments
Closed

PAGE_SLEEP_MIN being ignored? #510

daviderickson opened this issue Oct 12, 2020 · 6 comments
Assignees

Comments

@daviderickson
Copy link

Description

Hi running on Windows 10, my .env has configured PAGE_SLEEP_MIN (and PAGE_BACKOFF_MIN) both to 60000, so I'd expect a 60 second minimum delay between queries to the same store. However from the log printout I'm getting:

[12:18:06 PM] info :: ✖ [nvidia] [nvidia (3080)] founders edition :: OUT OF STOCK
[12:18:10 PM] info :: ✖ [nvidia] [nvidia (3080)] founders edition :: OUT OF STOCK
[12:19:13 PM] info :: ✖ [nvidia] [nvidia (3080)] founders edition :: OUT OF STOCK
[12:19:17 PM] info :: ✖ [nvidia] [nvidia (3080)] founders edition :: OUT OF STOCK

Which looks to me like the min value isn't being respected by the backend.

Thanks!

@xninjax
Copy link
Contributor

xninjax commented Oct 13, 2020

Hi @daviderickson, just wondering if your running the latest nvidia-snatcher? if you haven't done an update in a while, it may be worth doing so, as this issue should have been resolved in #465 (comment).

Alternately, you can try setting PAGE_SLEEP_MAX to 60000 as well, as this would be a workaround fix (if you haven't pulled a recent update/ or don't want to yet).

Let us know if either of these resolve the issue for you 👍

@jef
Copy link
Owner

jef commented Oct 13, 2020

Going to close and we can reopen if it ends up being a regression. Thanks @xninjax.

@jef jef closed this as completed Oct 13, 2020
@daviderickson
Copy link
Author

@xninjax @jef Yeah I pulled yesterday, I'm on f24f565 same problem.

@jef jef reopened this Oct 13, 2020
@andrewmackrodt
Copy link
Contributor

Looks like intended behaviour, the 3080 FE has 2 entries using different pages IIRC, same as the 3090. I was also confused by this behaviour when I first used the project, like @daviderickson I expected PAGE_SLEEP_MIN to be a 60 second minimum delay between queries to the same store. However, it acts as a delay between batches of queries to the same store.

@jef
Copy link
Owner

jef commented Oct 13, 2020

However, it acts as a delay between batches of queries to the same store.

That's correct. That being said, I was curious to make these requests to all the links parallel, since we aren't setting intervals between them. But not sure of the side effects.

@xninjax
Copy link
Contributor

xninjax commented Oct 13, 2020

Agreed the multiple hits can appear broken/confusing at first, but indeed the script is confirmed only checking one set of links per series per batch (i.e every 60sec here). 2 links per series on nvidia sore ✔️

image

  • logger.info delay added for debug purposes

EDIT:

Perhaps the PAGE_SLEEP_MIN/MAX definition could be improved to better reflect its current intended usage?

PAGE_SLEEP_MIN | Minimum sleep time between queries of the same store | In milliseconds, default: 5000
PAGE_SLEEP_MAX | Maximum sleep time between queries of the same store | In milliseconds, default: 10000

Change to:

PAGE_SLEEP_MIN | Minimum sleep time between queries of the same product page | In milliseconds, default: 5000
PAGE_SLEEP_MAX | Maximum sleep time between queries of the same product page | In milliseconds, default: 10000

@jef jef closed this as completed in 32f114b Oct 13, 2020
AdamSaketume26 pushed a commit to AdamSaketume26/nvidia-snatcher that referenced this issue Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants