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

Launch miner - runs miner_sync_simple.rb - deal with no internet connection #28

Open
neoneye opened this issue Dec 6, 2022 · 0 comments
Labels
bug Something isn't working miner LODA-RUST miner

Comments

@neoneye
Copy link
Collaborator

neoneye commented Dec 6, 2022

The script cannot deal with missing internet. It fails like this:

PROMPT> loda-rust mine

██╗      ██████╗ ██████╗  █████╗       ██████╗ ██╗   ██╗███████╗████████╗
██║     ██╔═══██╗██╔══██╗██╔══██╗      ██╔══██╗██║   ██║██╔════╝╚══██╔══╝
██║     ██║   ██║██║  ██║███████║█████╗██████╔╝██║   ██║███████╗   ██║   
██║     ██║   ██║██║  ██║██╔══██║╚════╝██╔══██╗██║   ██║╚════██║   ██║   
███████╗╚██████╔╝██████╔╝██║  ██║      ██║  ██║╚██████╔╝███████║   ██║   
╚══════╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝      ╚═╝  ╚═╝ ╚═════╝ ╚══════╝   ╚═╝
LODA-RUST version: 2022.12.4, build: RELEASE

metrics mode: NoMetricsServer
number of workers: 4
Press CTRL-C to stop the miner.


analytics_worker: child 19b0ec47-fa24-4e30-8062-301cd125fc32, received broadcast message: PerformSyncAndAnalytics
thread 'tokio-runtime-worker' panicked at 'Problem executing MinerSyncExecute: MinerSyncExecute with failing error code. executable_path: "/home/euclid/git/loda-rust/script/miner_sync_simple.rb" output: "error: no commit_id found in command output\noutput from command: git ls-remote origin HEAD"', loda-rust-cli/src/mine/analytics_worker.rs:67:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PROMPT> curl: (6) Could not resolve host: api.loda-lang.org

Solution

In miner_sync_simple.rb - Check for internet connectivity, before doing git commands.

In the Rust code - stop the executable when the miner_sync_simple.rb returns with an error.

@neoneye neoneye added bug Something isn't working miner LODA-RUST miner labels Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working miner LODA-RUST miner
Projects
None yet
Development

No branches or pull requests

1 participant