-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move CheckTraktToken to a Job #1201
Conversation
Move CheckTraktToken to a Job that runs every 12h instead of spamming the log every few minutes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A side effect of running it in the queue is that if the queue is paused for too long at the end of the expiring period then it will miss the timeframe to refresh the token, while running it on a timer outside the queue is not affected by this.
@da3dsoul can correct me if I'm wrong about this though.
return Task.CompletedTask; | ||
} | ||
|
||
// Convert the Unix timestamp to DateTime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also probably add a check if the date is in the past, and unset the token if it is instead of trying to refresh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If everybody is okay with my reply below, I'll mark this as resolved
My token expired months ago (in February) and was refreshed properly (in November), so you don't have to unset it because you would have to link it again while the app is still approved on Trakt. I'll look into the other things, currently it would work and is just migrated code |
and check if true or false in the Job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last batch of requested changes. 😔
Move CheckTraktToken to a Job that runs every 12h instead of spamming the log every few minutes.
The refresh of a fairly old token worked on my dev machine, but I'd be happy if someone else could check