Enhancement to process_container.py
Why
#4928
How
Per @guzzijones's recommendation logic needed to be added to cycle the sensor if the token is expired based of the TTL of the token
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Zach Hilliard seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
As per comments in #4928 I'd like to see why the existing code to refresh the token isn't working. There is logic to refresh the token as long as we access via the sensor_service, which in turn calls the get_api_key in the datastore.py (which is where the refresh logic is). In the example of where this fails, are we trying to access the api client without going through the sensor_service methods? If so, why? Do we need to add more methods to sensor_service instead, so that you can benefit from the refresh key code in there. OR have we got a bug in that refresh code.
The fact that we restart the service to create a new token is not ideal. yes we 'refresh' the token, but the way we do it isn't the cleanest.