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: telemetry service #1243

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into feat/telemetry-service
  • Loading branch information
MCozhusheck committed Jan 7, 2025
commit 093c9c18496c2c116dfe2c44b4bb5490cd177984
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
AIRDROP_API_BASE_URL: ${{ secrets.BETA_AIRDROP_API_BASE_URL }}
AIRDROP_TWITTER_AUTH_URL: ${{ secrets.BETA_AIRDROP_TWITTER_AUTH_URL }}
TELEMETRY_API_URL: ${{ secrets.BETA_TELEMETRY_API_URL }}
AIRDROP_WEBSOCKET_CRYPTO_KEY: ${{ secrets.DEV_AIRDROP_WEBSOCKET_CRYPTO_KEY }}
shell: bash
run: |
#set -xueo pipefail
Expand All @@ -69,6 +70,7 @@ jobs:
echo "AIRDROP_API_BASE_URL=${{ env.AIRDROP_API_BASE_URL }}" >> $GITHUB_ENV
echo "AIRDROP_TWITTER_AUTH_URL=${{ env.AIRDROP_TWITTER_AUTH_URL }}" >> $GITHUB_ENV
echo "TELEMETRY_API_URL=${{ env.TELEMETRY_API_URL }}" >> $GITHUB_ENV
echo "AIRDROP_WEBSOCKET_CRYPTO_KEY=${{ env.AIRDROP_WEBSOCKET_CRYPTO_KEY }}" >> $GITHUB_ENV
echo "TS_FEATURES=release-ci-beta, airdrop-env" >> $GITHUB_ENV
# numeric-only and cannot be greater than 65535 for msi target
export BETA_DATE=$(date +%m%d)
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ use keyring::Entry;
use log::{debug, error, info, warn};
use monero_address_creator::Seed as MoneroSeed;
use regex::Regex;
use serde::Serialize;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::fmt::Debug;
use std::fs::{read_dir, remove_dir_all, remove_file, File};
use std::sync::atomic::Ordering;
use std::thread::{available_parallelism, sleep};
Expand Down
15 changes: 9 additions & 6 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ use p2pool::models::Connections;
use serde_json::json;
use std::fs::{create_dir_all, remove_dir_all, remove_file, File};
use std::ops::Deref;
use std::path::Path;
use tauri_plugin_cli::CliExt;
use telemetry_service::TelemetryService;
use tokio::sync::watch::{self};
use updates_manager::UpdatesManager;
Expand Down Expand Up @@ -548,22 +550,23 @@ async fn setup_inner(
)
.await?;

progress.set_max(45).await;
progress.update("wallet-started".to_string(), None, 0).await;
progress
.update("waiting-for-node".to_string(), None, 0)
.await;
progress.set_max(75).await;
drop(
telemetry_service
.send(
"preparing-for-initial-sync".to_string(),
json!({
"service": "initial_sync",
"percentage":40,
"percentage":45,
}),
)
.await,
);
progress.set_max(75).await;
progress
.update("waiting-for-node".to_string(), None, 0)
.await;
progress.set_max(75).await;
state.node_manager.wait_synced(progress.clone()).await?;

if state.config.read().await.p2pool_enabled() {
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.