Skip to content

Commit

Permalink
fixed dump scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyWilliams committed Jun 10, 2022
1 parent 5edc123 commit 4abb543
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions services/annotations_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
if not os.path.exists(settings.ANNOTATIONS_DUMP):
os.makedirs(settings.ANNOTATIONS_DUMP)

cmd = 'mysqldump -u %s -p%s --port=%s --host=lasair-dev-db ztf annotations > %s/annotations.sql'
cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.ANNOTATIONS_DUMP)
cmd = 'mysqldump -u %s -p%s --port=%s --host=%s ztf annotations > %s/annotations.sql'
cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.DB_HOST, settings.ANNOTATIONS_DUMP)
os.system(cmd)

cmd = 'mysql -u %s -p%s --port=%s --host=%s ztf -e "select count(*) from annotations" >> %s'
Expand Down
6 changes: 3 additions & 3 deletions services/crossmatch_tns_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
if not os.path.exists(settings.CROSSMATCH_TNS_DUMP):
os.makedirs(settings.CROSSMATCH_TNS_DUMP)

cmd = 'mysqldump -u %s -p%s --port=%s --host=lasair-dev-db ztf crossmatch_tns > %s/crossmatch_tns.sql'
cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.CROSSMATCH_TNS_DUMP)
cmd = 'mysqldump -u %s -p%s --port=%s --host=%s ztf crossmatch_tns > %s/crossmatch_tns.sql'
cmd = cmd % (settings.DB_USER_READWRITE, settings.DB_PASS_READWRITE, settings.DB_PORT, settings.DB_HOST, settings.CROSSMATCH_TNS_DUMP)
os.system(cmd)

cmd = 'mysql -u %s -p%s --port=%s --host=%s ztf -e "select count(*) from crossmatch_tns" >> %s'
cmd = cmd % (settings.DB_USER_READONLY, settings.DB_PASS_READONLY, settings.DB_PORT, settings.DB_HOST, logfile)
cmd = cmd % (settings.DB_USER_READONLY, settings.DB_PASS_READONLY, settings.DB_PORT, settings.DB_HOST, logfile)
os.system(cmd)

cmd = 'ls -l %s/crossmatch_tns.sql >> %s'
Expand Down

0 comments on commit 4abb543

Please sign in to comment.