amonks / run

Go run some tasks!
https://amonks.github.io/run/
Other
19 stars 4 forks source link

periodic invalidation? #53

Open amonks opened 1 year ago

amonks commented 1 year ago

this is easy enough to implement, but I don't want to add to the API surface unless there's a real use case

cgsdev0 commented 1 year ago

I have a potential use case for this

I use run to run some twitch-api-consuming processes

however, twitch's oauth tokens expire after 4 hours

it would be neat if i could invalidate my refresh-tokens task every 4 hours (which could be a trigger to invalidate the tasks that use the token)

https://github.com/cgsdev0/dotfiles/blob/d976e9a58450bbcd460f007efec9168a4aeb25dd/tasks.toml#L6-L12

buuuuuut, i could also just make refresh-tokens a "long" task and add a sleep 14400 to the cmd, so maybe it's not really needed 🤔