Reduced requests by removing refresh token from operations and loading token data in the first step of an operation

This commit is contained in:
Lyncoln
2026-10-26 10:04:18 -04:00
parent ecfaa3fdfb
commit 5236ae1e06
5 changed files with 29 additions and 6 deletions
+9
View File
@@ -1,3 +1,5 @@
import os
name = "Availability check" name = "Availability check"
kind = "action" kind = "action"
@@ -32,3 +34,10 @@ prints = {
recoverPolicy = { recoverPolicy = {
KeyError: [] KeyError: []
} }
loaddata = [
"access_token",
"refresh_token",
]
savepath = os.environ["TOKEN_STORE"]
+8
View File
@@ -1,3 +1,5 @@
import os
name = "Get message list" name = "Get message list"
kind = "action" kind = "action"
@@ -33,3 +35,9 @@ outputs = {
"emails": "emails" "emails": "emails"
} }
loaddata = [
"access_token",
"refresh_token",
]
savepath = os.environ["TOKEN_STORE"]
+1 -1
View File
@@ -51,7 +51,7 @@ recoverPolicy = {
], ],
} }
sleeptime = 120 sleeptime = 105
#saverow = { #saverow = {
# "table": "credentials", # "table": "credentials",
+11 -4
View File
@@ -1,4 +1,4 @@
from plugins.rmass.actions import rmassmessagepush, synapsegetroomalias, refresh_tokens, synapsegetlastmessage, getrmassconversation from plugins.rmass.actions import rmassmessagepush, synapsegetroomalias, refresh_tokens, synapsegetlastmessage, getrmassconversation, synapsegetattachment, getrmassattachmenturl, synapseattachmenttormass, getrmassattachmentid, rmassattachmentpush
name = "RMASS Message Push" name = "RMASS Message Push"
@@ -6,13 +6,20 @@ kind = "recursiveset"
recursiveset = { recursiveset = {
"source": "events", "source": "events",
#"retain": False,
"outputlabel": "outmessageitem", "outputlabel": "outmessageitem",
"actions": [ "actions": [
synapsegetroomalias, #refresh_tokens,
refresh_tokens, synapsegetroomalias,
rmassmessagepush, rmassmessagepush,
synapsegetlastmessage, synapsegetlastmessage,
getrmassconversation synapsegetattachment,
getrmassattachmenturl,
synapseattachmenttormass,
getrmassattachmentid,
rmassattachmentpush,
synapsegetlastmessage,
getrmassconversation,
], ],
} }
-1
View File
@@ -5,7 +5,6 @@ name = "Set Available"
kind = "operation" kind = "operation"
actions = [ actions = [
refresh_tokens,
checkavailable, checkavailable,
setavailable, setavailable,
] ]