2021-10-25 13:43:38 +02:00
|
|
|
import logging.config
|
|
|
|
|
2022-07-12 07:39:56 +02:00
|
|
|
from mobilizon_reshare.cli.commands import print_reports
|
|
|
|
from mobilizon_reshare.config.command import CommandConfig
|
2021-10-25 13:43:38 +02:00
|
|
|
from mobilizon_reshare.main.recap import recap
|
|
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
2022-07-12 07:39:56 +02:00
|
|
|
async def recap_command(command_config: CommandConfig):
|
2021-10-25 13:43:38 +02:00
|
|
|
|
2022-07-12 07:39:56 +02:00
|
|
|
reports = await recap(command_config)
|
|
|
|
if command_config.dry_run and reports:
|
|
|
|
print_reports(reports)
|
2021-10-25 13:43:38 +02:00
|
|
|
return 0 if reports and reports.successful else 1
|