There are lots of different elements and two possible states for each. It is necessary that this state is randomly generated and not changed within an hour. The state of each element should not be stored in the system, but should be generated as needed. How to do it? While there is an idea like this - based on the hour number and day number (so that each day is new and does not repeat at the same time of each day) and the element name generate a random number from 1 to 10, if less than 5, then the first state, if more, the second . But how to generate a number based on another number? Or how else can one generate a constant state (one of two), so that it is the same for the whole hour? It is necessary that this works either on the server (Python, Django), or on the client (JavaScript, Angular).
I will give an example. There are elements A, B, C. And two states - 1 and 2 . Suppose, at 20:00, upon request, their status will return A-1, B-1, C-2 . If you make requests at 20:05, 20:22, 20:45 and so on, that will return anyway A-1, B-1, C-2 . But if you make a request at the next hour, for example, at 21:03, then other states will return for elements, for example, A-2, B-1, C-1 . They should not be stored somewhere, but should be generated. How to do this?
Состояние каждого элемента не должно храниться в системеat this moment you started having made-up problems from nothing. 1. Store a random number on the server. 2 if it is obsolete, then update it with regular means of generating the HRP - ReinRaus