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

feat: add graceful shutdown #25

Merged
merged 4 commits into from
Jul 27, 2023
Merged

feat: add graceful shutdown #25

merged 4 commits into from
Jul 27, 2023

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Jul 13, 2023

closes: #20

  • I added custom Debugs to FuelBlock and FuelBlockCommitedOnEth for better log readability.

@hal3e hal3e added the enhancement New feature or request label Jul 13, 2023
@hal3e hal3e self-assigned this Jul 13, 2023
@Voxelot
Copy link
Member

Voxelot commented Jul 14, 2023

What about signal handling, ie. like how fuel-core does it:

https://github.com/FuelLabs/fuel-core/blob/7b2f51d1307f24ecc7013a91fb172764b4e4c9bd/bin/fuel-core/src/cli/run.rs#L379

By capturing the stop signal, it will make docker / k8s wait 30s for the service to shut itself down before force-killing it.

@hal3e
Copy link
Contributor Author

hal3e commented Jul 14, 2023

What about signal handling, ie. like how fuel-core does it:

https://github.com/FuelLabs/fuel-core/blob/7b2f51d1307f24ecc7013a91fb172764b4e4c9bd/bin/fuel-core/src/cli/run.rs#L379

By capturing the stop signal, it will make docker / k8s wait 30s for the service to shut itself down before force-killing it.

The axtic web server is listening to SIGINIT and SIGTERM signals. Once they are received and the axtic web server is down, our shutdown_function is called and we signal all our tasks to stop and we wait until they are down.

src/adapters/ethereum_adapter.rs Outdated Show resolved Hide resolved
src/adapters/fuel_adapter.rs Outdated Show resolved Hide resolved
@hal3e hal3e merged commit bb352c6 into master Jul 27, 2023
5 checks passed
@hal3e hal3e deleted the feat/shutdown2 branch May 28, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graceful shutdown
3 participants