wip
This commit is contained in:
parent
9e295a6f18
commit
fcc5f2eb35
2 changed files with 22 additions and 14 deletions
10
agent.py
10
agent.py
|
@ -134,12 +134,12 @@ def send_update(force=False):
|
|||
(current_time - last_send_time).total_seconds() < CHECK_INTERVAL):
|
||||
return
|
||||
|
||||
# Create the data payload
|
||||
# Always include the server name in data payload
|
||||
data = {
|
||||
"server": SERVER_NAME,
|
||||
"server": SERVER_NAME, # Always include this
|
||||
"entries": current_data,
|
||||
"timestamp": current_time.isoformat(),
|
||||
"type": SERVER_TYPE # Add the server type
|
||||
"type": SERVER_TYPE
|
||||
}
|
||||
|
||||
# Create authentication token
|
||||
|
@ -158,8 +158,8 @@ def send_update(force=False):
|
|||
DASHBOARD_URL,
|
||||
json=data,
|
||||
headers=headers,
|
||||
timeout=10, # Set a reasonable timeout
|
||||
verify=VERIFY_SSL # Control SSL verification
|
||||
timeout=10,
|
||||
verify=VERIFY_SSL
|
||||
)
|
||||
|
||||
if response.status_code == 200:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue