add more logging for when we write Objects

pull/413/head
Ryan Barrett 2023-02-07 08:24:36 -08:00
rodzic c143192aa4
commit e1856c21a1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
3 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -328,6 +328,7 @@ def send_webmentions(activity_wrapped, proxy=None, **object_props):
if activity.get('objectType') == 'activity':
obj.labels.append('activity')
obj.put()
logging.info(f'Created Object {source}')
for target in targets:
domain = util.domain_from_link(target.uri, minimize=False)
@ -362,6 +363,7 @@ def send_webmentions(activity_wrapped, proxy=None, **object_props):
obj.status = 'complete' if obj.delivered else 'failed' if obj.failed else 'ignored'
obj.put()
logging.info(f'Finalized Object {source} as {obj.status}')
if errors:
msg = 'Errors: ' + ', '.join(f'{code} {body}' for code, body in errors)

Wyświetl plik

@ -174,6 +174,7 @@ class FollowCallback(indieauth.Callback):
source_protocol='ui', status='complete', as2=follow_json,
as1=json_dumps(as2.to_as1(follow_as2), sort_keys=True),
).put()
logging.info(f'Wrote Object {follow_id}')
link = common.pretty_link(util.get_url(followee) or id, text=addr)
flash(f'Followed {link}.')
@ -244,6 +245,7 @@ class UnfollowCallback(indieauth.Callback):
as2=json_dumps(unfollow_as2, sort_keys=True),
as1=json_dumps(as2.to_as1(unfollow_as2), sort_keys=True),
).put()
logging.info(f'Wrote Object {unfollow_id}')
link = common.pretty_link(util.get_url(followee) or followee_id)
flash(f'Unfollowed {link}.')

Wyświetl plik

@ -162,7 +162,7 @@ class Webmention(View):
undelivered=[Target(uri=uri, protocol='activitypub')
for uri in inboxes_to_targets.keys()],
status='in progress')
logging.info(f'Storing new {obj}')
logging.info(f'Storing new Object {self.source_url}')
obj.domains = [self.source_domain]
obj.source_protocol = 'webmention'