Moved token refresh into its worn operation for process registry compatibility
This commit is contained in:
@@ -5,6 +5,8 @@ name = "Token refresh"
|
||||
|
||||
kind = "action"
|
||||
|
||||
alias = "refresh_tokens"
|
||||
|
||||
showstatus = True
|
||||
|
||||
method = "GET"
|
||||
@@ -44,6 +46,15 @@ outputs = {
|
||||
"refresh_token": "refreshToken",
|
||||
}
|
||||
|
||||
responsepolicy = [
|
||||
{
|
||||
"statuscode": 403,
|
||||
"print": "Refreshing stale tokens...",
|
||||
"execute": login,
|
||||
"response_update": False,
|
||||
}
|
||||
]
|
||||
|
||||
recoverPolicy = {
|
||||
FileNotFoundError: [
|
||||
getcsrf,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import os
|
||||
|
||||
from plugins.rmass.actions import refresh_tokens
|
||||
|
||||
name = "Token Refresh Operation"
|
||||
|
||||
kind = "operation"
|
||||
|
||||
actions = [
|
||||
refresh_tokens,
|
||||
]
|
||||
|
||||
sleeptime = os.environ.get("TOKEN_REFRESH_RATE", 105)
|
||||
Reference in New Issue
Block a user