D
D
Dmitry Kolyada2019-10-03 17:17:43
API
Dmitry Kolyada, 2019-10-03 17:17:43

How to get rid of thread conflict when the authorization key is outdated?

Let there be a program that parses some API in X threads, and even X programs are better, they do not interact with each other. Roughly speaking, several instances of the same parser are launched, each one simply parses its own entity. At some point, the JWT authorization token becomes obsolete and each thread gets an error. Throwing all of them to log in seems irrational, because. they will file as each will get their own key. Accordingly, they will become obsolete and will not be able to come to one single key. Can you please tell me how to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2019-10-03
@xmoonlight

Composer to check the valid key and re-request it: i.e. it manages all concurrent/asynchronous threads using the authorization key.
If the composer allowed, then the thread(s) is executed, otherwise it waits for the command.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question