Skip to content
Draft
Changes from all commits
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
6 changes: 3 additions & 3 deletions bmon/bitcoind_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def mempool_activity(avro_data: dict, linehash: str):
def queue_mempool_to_ship():
now_str = datetime.datetime.now().isoformat()
shipfile = settings.MEMPOOL_ACTIVITY_CACHE_PATH / f"to-ship.{now_str}.avro"
subprocess.check_call(f"mv {CURRENT_MEMPOOL_FILE} {shipfile}", shell=True)
CURRENT_MEMPOOL_FILE.replace(shipfile)
log.info(
"moved mempool activity file %s to %s for shipment",
CURRENT_MEMPOOL_FILE,
Expand Down Expand Up @@ -288,7 +288,7 @@ def ship_mempool_activity():
d.upload_from_filename(shipfile)

moved = settings.MEMPOOL_ACTIVITY_CACHE_PATH / f"shipped.{timestr}.avro"
subprocess.check_call(f"mv {shipfile} {moved}", shell=True)
shipfile.replace(moved)
log.info("pushed mempool activity %s to Chaincode GCP", shipfile)
except Exception:
mempool_ship_lock.release()
Expand Down Expand Up @@ -328,7 +328,7 @@ def get_latest_host() -> models.Host:
def create_host_record():
def get_lshw(classn: str) -> dict:
return json.loads(
subprocess.check_output(f"lshw -json -class {classn}", shell=True)
subprocess.check_output(["lshw", "-json", "-class", classn])
)[0]

bitcoin_version = bitcoin.api.read_raw_bitcoind_version()
Expand Down