Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziofiorucci committed Nov 7, 2022
1 parent 65dcc47 commit 9664d54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions f5tt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def scheduledPush(url, username, password, interval, pushmode):
try:
if nc_mode == 'NGINX_MANAGEMENT_SYSTEM':
if pushmode == 'CUSTOM':
payload = nms.nmsInstances(mode='JSON')
payload,code = nms.nmsInstances(mode='JSON')
elif pushmode == 'PUSHGATEWAY':
payload = nms.nmsInstances(mode='PUSHGATEWAY')
payload,code = nms.nmsInstances(mode='PUSHGATEWAY')
elif nc_mode == 'BIG_IQ':
if pushmode == 'CUSTOM':
payload,code = bigiq.bigIqInventory(mode='JSON')
Expand Down Expand Up @@ -91,9 +91,8 @@ def scheduledEmail(email_server, email_server_port, email_server_type, email_aut
while True:
try:
if nc_mode == 'NGINX_MANAGEMENT_SYSTEM':
payload = nms.nmsInstances(mode='JSON')
jsonPayload = json.loads(payload)
subscriptionId = '[' + jsonPayload['subscription']['id'] + '] '
payload,code = nms.nmsInstances(mode='JSON')
subscriptionId = '[' + payload['subscription']['id'] + '] '
subjectPostfix = 'NGINX Usage Reporting'
attachname = 'nginx_report.json'
elif nc_mode == 'BIG_IQ':
Expand Down Expand Up @@ -343,7 +342,7 @@ def not_found(uri: str):
email_auth_user = ''
email_auth_pass = ''

print('Email reporting to', email_recipient, 'every', email_interval, 'days')
print('Email reporting to', email_recipient, 'every', email_interval, 'minutes')
print('Running push thread')
emailThread = threading.Thread(target=scheduledEmail, args=(
email_server, email_server_port, email_server_type, email_auth_user, email_auth_pass, email_sender,
Expand Down
2 changes: 1 addition & 1 deletion manifests/1.f5tt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ spec:
#- name: EMAIL_ENABLED
# value: "false"
#- name: EMAIL_INTERVAL
# EMAIL_INTERVAL specified in days
# EMAIL_INTERVAL specified in minutes
# value: "5"

#- name: EMAIL_SERVER
Expand Down

0 comments on commit 9664d54

Please sign in to comment.