Skip to content
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

Enhance cleanup mechanism to account for token expiry #1

Open
whummer opened this issue Feb 3, 2020 · 1 comment
Open

Enhance cleanup mechanism to account for token expiry #1

whummer opened this issue Feb 3, 2020 · 1 comment

Comments

@whummer
Copy link

whummer commented Feb 3, 2020

Thanks for publishing this useful library!

After staying connected for some time, the SQS polling fails with:

ExpiredToken: The security token included in the request is expired

In this case, the Node.js process dies, but is unable to perform the cleanup (because deleting the SQS queues would require a valid token).

It would be useful to have a more robust cleanup mechanism, e.g., by defining the name of the queue via the command line, or based on certain attributes attached to the test queue. ontopic could then identify and clean up old left-over SQS queues on startup.

Another option could be to allow the user to update the credentials at runtime.

@ziggy42
Copy link
Owner

ziggy42 commented Feb 3, 2020

Good point, I will need to think about what we could realistically do.
In the meantime I added some improvements in #3:

  • add tag to SQS queue
  • try to remove resources after error in listen function
  • print to stdout instructions to handle failed removed resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants