You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
607 B
Python
22 lines
607 B
Python
import argparse
|
|
import asyncio
|
|
import json
|
|
|
|
from app.services.integrations.service import process_pending_deliveries
|
|
|
|
|
|
async def _main_async(limit: int) -> None:
|
|
deliveries = await process_pending_deliveries(limit=limit)
|
|
print(json.dumps(deliveries, ensure_ascii=True, indent=2, sort_keys=True))
|
|
|
|
|
|
def main() -> None:
|
|
parser = argparse.ArgumentParser(description="Processa entregas pendentes do outbox de integracoes.")
|
|
parser.add_argument("--limit", type=int, default=20)
|
|
args = parser.parse_args()
|
|
asyncio.run(_main_async(limit=args.limit))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|