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

Volod/eng 2733 avoid dlp validator crashes eg if rpc goes down 2 #57

Conversation

volod-vana
Copy link
Member

image

@volod-vana volod-vana self-assigned this Jul 12, 2024
@volod-vana volod-vana requested review from Kahtaf and tnunamak and removed request for Kahtaf July 12, 2024 14:21
vana.logging.error(f"An error occurred: {str(e)}")
vana.logging.error("Restarting the validator in 30 seconds...")
asyncio.sleep(30)
except KeyboardInterrupt:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we shut down the KeyboardInterrupt more gracefully like here? Maybe we can even get rid of the KeyboardInterrupt there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I removed KeyboardInterrupt from the if __name__ == "__main__" section, one in run method works properly, no need to duplicate that.

I also change it a little bit to move initialization inside while loop, this cover the case when validatior starts for the first time with broken RPC / network issues.

@volod-vana volod-vana requested a review from Kahtaf July 12, 2024 17:15
@volod-vana volod-vana merged commit 669a866 into main Jul 12, 2024
2 checks passed
@volod-vana volod-vana deleted the volod/eng-2733-avoid-dlp-validator-crashes-eg-if-rpc-goes-down-2 branch July 12, 2024 19:56
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

Successfully merging this pull request may close these issues.

3 participants