You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using custom_token to initialize SofarApi, the custom token does not get passed into the Spotter workers. The Spotter workers will then each create their own instance of SofarApi that uses the WF_API_TOKEN environment variable, possibly resulting in failed queries due to using a wrong or missing token
The text was updated successfully, but these errors were encountered:
@g-mo this is a rather tricky issue it seems. It is not always obvious when a new instance of the connection class gets created, and when the updated token needs to be passed.
From a user perspective- I am inclined to not tie a token to an object instance, but make it a global property instead. The case where you would want to have multiple connections with different keys seems somewhat niche- and it seems more intuitive to me that once a User sets a new Token - the get_token function just returns that token.
Complication is that currently tokens are also stored in the header parts of the sofarconnection objects, which would not automatically get updated on a change of state. Maybe adding the token to the header should be left to the point where we do a call to get/post etc.?
When using
custom_token
to initializeSofarApi
, the custom token does not get passed into the Spotter workers. The Spotter workers will then each create their own instance ofSofarApi
that uses theWF_API_TOKEN
environment variable, possibly resulting in failed queries due to using a wrong or missing tokenThe text was updated successfully, but these errors were encountered: