https://github.com/jsonzilla/queue_token_micro
A small application to use tokens to restart Windows machines
https://github.com/jsonzilla/queue_token_micro
Last synced: 12 months ago
JSON representation
A small application to use tokens to restart Windows machines
- Host: GitHub
- URL: https://github.com/jsonzilla/queue_token_micro
- Owner: jsonzilla
- License: mit
- Created: 2022-01-20T10:34:42.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-25T13:00:09.000Z (over 2 years ago)
- Last Synced: 2025-01-27T05:51:45.999Z (about 1 year ago)
- Language: HTML
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# QueueTokenMicro
[](https://go.deta.dev/deploy?https://github.com/jsonzilla/QueueTokenMicro)
A small application to use tokens to restart Windows machines
## Deta docs
https://docs.deta.sh/
## Deta clone
deta clone --name queuetoken --project default
## Run local
python -m uvicorn main:app --reload
## Client
Consume tokens, get the machine domain name and use to send a reboot command to the machine.
```
client.py
```
## Tables
### Token (in memory)
Temporary token to consume
```
{ "key": "token" }
```
### Uses
Log the tokens dispatchs to the machines.
"timestamp": datetime,"user": string
```
{
"timestamp": "2020-01-01T00:00:00.000Z",
"user": "John Doe"}
```
### Machines:
Relation between tokens and machines.
"key": string, "machine": string, "user": string
```
{ "key": "token", "machine": "id", "user": "John Doe" },
```
## Default Timezone
Need to set your timezone.
'America/Sao_Paulo' set in convert_time.py line 13.
## Load Machines
```
machines_load.py
```