mirror of
https://github.com/hinto-janai/gupax.git
synced 2024-11-16 17:27:37 +00:00
helper: always uptime xmrig uptime in update_from_output()
This commit is contained in:
parent
5699fe6702
commit
364429ca68
2 changed files with 6 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2018,7 +2018,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gupax"
|
||||
version = "1.3.3"
|
||||
version = "1.3.4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arti-client",
|
||||
|
|
|
@ -1930,9 +1930,12 @@ impl PubXmrigApi {
|
|||
) {
|
||||
// 1. Take the process's current output buffer and combine it with Pub (if not empty)
|
||||
let mut output_pub = lock!(output_pub);
|
||||
if !output_pub.is_empty() {
|
||||
|
||||
{
|
||||
let mut public = lock!(public);
|
||||
if !output_pub.is_empty() {
|
||||
public.output.push_str(&std::mem::take(&mut *output_pub));
|
||||
}
|
||||
// Update uptime
|
||||
public.uptime = HumanTime::into_human(elapsed);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue