Repository navigation
Expand file tree
/
Copy pathverify_cloud.py
More file actions
50 lines (38 loc) · 1.46 KB
/
Copy pathverify_cloud.py
File metadata and controls
50 lines (38 loc) · 1.46 KB
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
import os
import sys
from datetime import datetime
# Add the current directory to path so we can import modules
sys.path.append(os.getcwd())
import config
from memory import memory
def check_cloud():
print("--- Firebase Job Discovery Report ---")
try:
# get_jobs will automatically use Firebase if configured in config.py / .env
jobs = memory.get_jobs(config.DB_PATH)
if not jobs:
print("No jobs found in Firebase. The agent might still be scouting or the database is empty.")
return
print(f"Total Jobs Found: {len(jobs)}")
# Group by status
stats = {}
for job in jobs:
s = job.get('status', 'inbox')
stats[s] = stats.get(s, 0) + 1
for s, count in stats.items():
print(f"Status: {s.upper()} | Count: {count}")
print("\n--- Most Recent 15 Jobs ---")
for job in jobs[:15]:
company = job.get('company', 'UNKNOWN')
role = job.get('role', 'N/A')
link = job.get('link', 'No Link')
ts = job.get('timestamp')
if isinstance(ts, datetime):
ts_str = ts.strftime('%Y-%m-%d %H:%M')
else:
ts_str = str(ts)
print(f"[{ts_str}] {company} - {role} | {link[:50]}...")
except Exception as e:
print(f"Error checking Firebase: {e}")
if __name__ == "__main__":
check_cloud()