Skip to content

Commit

Permalink
email changes 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Devon Joseph Leadman committed Oct 23, 2024
1 parent 4afa95f commit 10dbe37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 1 addition & 5 deletions start_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from subprocess import *
from time import sleep
import argparse
import detect_transfer
import seed_cluster
from RDAS_MEMGRAPH_APP.Alert import Alert
from RDAS_MEMGRAPH_APP.Transfer import Transfer
from datetime import datetime
Expand All @@ -30,9 +28,7 @@
print('checking for update...')
# Detect new dumps in the production server
transfer_detection,last_updates = transfer_module.detect(sysvars.transfer_path)
approval_detection,last_updates_approval = transfer_module.detect(sysvars.approved_path)
new_dumps = [k for (k,v) in transfer_detection.items() if v]
new_dumps_approval = [k for (k,v) in approval_detection.items() if v]
new_dumps = transfer_detection

# Sets the current db files last transfer date to today so it doesnt load and send emails upon script starting
if init:
Expand Down
9 changes: 6 additions & 3 deletions start_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@
recip = sysvars.contacts['test']
today_str = datetime.today().strftime('%m/%d/%y')

# INIT
transfer_detection,lastupdates = transfer_module.detect(sysvars.transfer_path)
transfer_detection,lastupdates = transfer_module.detect(sysvars.approved_path)

while True:
# Detects all new dump files in the transfer folder of the TEST server
transfer_detection,lastupdates = transfer_module.detect(sysvars.transfer_path)
new_dumps = transfer_detection[0]
new_dumps = transfer_detection
for db_name in new_dumps:
transfer_module.seed(db_name,sysvars.transfer_path)
transfer_module.seed(db_name,sysvars.transfer_path)
print('database seeded within cluster')

Expand Down Expand Up @@ -71,7 +74,7 @@

# Detects if a new dump file was loaded into the approved folder
transfer_detection,lastupdates = transfer_module.detect(sysvars.approved_path)
new_dumps = transfer_detection[0]
new_dumps = transfer_detection
print(new_dumps)

for db_name in new_dumps:
Expand Down

0 comments on commit 10dbe37

Please sign in to comment.