Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions datadog_sync/utils/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,22 @@ async def init_async(self, cmd: Command):

# Don't sync if DDR is active
if self.verify_ddr_status:
try:
await _verify_ddr_status(self.destination_client)
except Exception as err:
self.logger.error(
f"The destination DDR verification failed. {err} Use the --verify-ddr-status flag to override."
)
sys.exit(1)
try:
await _verify_ddr_status(self.source_client)
except Exception as err:
self.logger.error(
f"The source DDR verification failed. {err} Use the --verify-ddr-status flag to override."
)
sys.exit(1)
if cmd in [Command.SYNC, Command.DIFFS, Command.MIGRATE, Command.RESET]:
try:
await _verify_ddr_status(self.destination_client)
except Exception as err:
self.logger.error(
f"The destination DDR verification failed. {err} Use the --verify-ddr-status flag to override."
)
sys.exit(1)
if cmd in [Command.IMPORT, Command.DIFFS, Command.MIGRATE]:
try:
await _verify_ddr_status(self.source_client)
except Exception as err:
self.logger.error(
f"The source DDR verification failed. {err} Use the --verify-ddr-status flag to override."
)
sys.exit(1)
self.logger.info("DDR verified successfully")
else:
self.logger.warning("DDR verification skipped.")
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-03-20T10:50:46.693087-04:00
Loading