Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email changes 4 #78

Merged
merged 18 commits into from
Oct 23, 2024
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
10 changes: 8 additions & 2 deletions start_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +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)
Expand Down Expand Up @@ -71,7 +76,8 @@

# 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
Loading