Show changes in launch JSON
This commit is contained in:
parent
d1898686e9
commit
b38ec99628
|
@ -9,6 +9,7 @@ import typing
|
||||||
from datetime import date, datetime
|
from datetime import date, datetime
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
|
import deepdiff # type: ignore
|
||||||
import flask
|
import flask
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
@ -87,16 +88,14 @@ def report_space_launch_change(
|
||||||
name = prev_launch["name"]
|
name = prev_launch["name"]
|
||||||
subject = f"Change to {name}"
|
subject = f"Change to {name}"
|
||||||
|
|
||||||
|
differences = deepdiff.DeepDiff(prev_launch, cur_launch)
|
||||||
|
|
||||||
body = f"""
|
body = f"""
|
||||||
A space launch of interest was updated.
|
A space launch of interest was updated.
|
||||||
|
|
||||||
Get ready for two big piles of JSON.
|
Get ready for two big piles of JSON.
|
||||||
|
|
||||||
Old launch data
|
{json.dumps(differences, indent=2)}
|
||||||
{json.dumps(prev_launch, indent=2)}
|
|
||||||
|
|
||||||
New launch data
|
|
||||||
{json.dumps(cur_launch, indent=2)}
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
agenda.mail.send_mail(config, subject, body)
|
agenda.mail.send_mail(config, subject, body)
|
||||||
|
|
Loading…
Reference in a new issue