File size: 1,965 Bytes
7873ee1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #!/usr/bin/env python3
import subprocess
import os
from pathlib import Path
def find_python_processes():
try:
result = subprocess.run(
['wmic', 'process', 'where', 'name="python.exe"', 'get', 'processid,commandline'],
capture_output=True,
text=True
)
if result.returncode == 0:
lines = result.stdout.strip().split('\n')
upload_processes = [
line.strip() for line in lines[1:] if line.strip() and 'upload' in line.lower()
]
if upload_processes:
print("✓ Upload processes found:")
for proc in upload_processes:
print(f" {proc}")
else:
print("⚠ No upload processes found")
else:
print("✗ Error checking processes")
except Exception as e:
print(f"Error: {e}")
def check_files():
files_to_check = [
'upload_log.txt',
'test_upload_results.txt',
'dagshub_analysis.txt'
]
for file_path in files_to_check:
path = Path(file_path)
if path.exists():
size = path.stat().st_size
print(f"✓ {file_path} exists ({size} bytes)")
else:
print(f"⚠ {file_path} does not exist")
def main():
print("=== Upload Status Check ===")
print(f"Current directory: {os.getcwd()}")
print()
print("1. Checking processes...")
find_python_processes()
print("\n2. Checking files...")
check_files()
try:
result = subprocess.run(['dagshub', '--help'], capture_output=True, text=True, timeout=5)
if result.returncode == 0:
print("✓ DagsHub CLI is working")
else:
print("✗ DagsHub CLI is not working")
except Exception as e:
print(f"✗ Error testing DagsHub CLI: {e}")
if __name__ == "__main__":
main()
|