A small application to use tokens to restart Windows machines
deta clone --name queuetoken --project default
python -m uvicorn main:app --reload
Consume tokens, get the machine domain name and use to send a reboot command to the machine.
client.py
Temporary token to consume
{ "key": "token" }
Log the tokens dispatchs to the machines. "timestamp": datetime,"user": string
{
"timestamp": "2020-01-01T00:00:00.000Z",
"user": "John Doe"}
Relation between tokens and machines. "key": string, "machine": string, "user": string
{ "key": "token", "machine": "id", "user": "John Doe" },
Need to set your timezone. 'America/Sao_Paulo' set in convert_time.py line 13.
machines_load.py