kopia lustrzana https://github.com/snarfed/bridgy-fed
add more logging for when we write Objects
rodzic
c143192aa4
commit
e1856c21a1
|
@ -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)
|
||||
|
|
|
@ -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}.')
|
||||
|
|
|
@ -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'
|
||||
|
|
Ładowanie…
Reference in New Issue