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

Seeing intermittent future_key errors #53

Open
bfeist opened this issue Apr 27, 2023 · 3 comments
Open

Seeing intermittent future_key errors #53

bfeist opened this issue Apr 27, 2023 · 3 comments

Comments

@bfeist
Copy link

bfeist commented Apr 27, 2023

2023-04-25 23:12:39 ERROR:flask_shell2http:future_key ebbb407f already exists 2023-04-25 23:12:39 ERROR:flask_shell2http:No report exists for key: 'ebbb407f'.

These are interspersed with working calls.

I turned off wait=true and switched to polling. This reduced the problem but didn't eliminate it.

Are there any docs on how to endure the key doesn't already exist? I don't believe I'm managing the keys externally to shell2http.

Thanks so much.

@eshaan7
Copy link
Owner

eshaan7 commented May 3, 2023

Hi. Can you tell the version of python and flask-shell2http being used and with what server is your flask code deployed?

@eshaan7
Copy link
Owner

eshaan7 commented May 3, 2023

Can you also tell if your client tries to execute same command with the same args multiple times? If that is the case, you might want to set the force_unique_key parameter to true (see example).

Hint By default, the key is the SHA1 sum of the command + args POSTed to the API. This is done as a rate limiting measure so as to prevent multiple jobs with same parameters, if one such job is already running. If force_unique_key is set to true, the API will bypass this default behaviour and a psuedorandom key will be returned instead.

-- docs (see 2nd hint)

@bfeist
Copy link
Author

bfeist commented May 4, 2023

Ah this explains it. Yes, several calls with the same parameters are possible. I'll have a look at how to force_unique_key. Thanks for the followup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants