1
0
Fork 0
forked from mirror/pixelfed

Add temp logging

This commit is contained in:
Daniel Supernault 2023-05-25 01:23:57 -06:00
parent aad4259a47
commit b0634bfd8f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 8 additions and 0 deletions

View file

@ -33,9 +33,12 @@ class StatusRemoteUpdatePipeline implements ShouldQueue
*/ */
public function handle(): void public function handle(): void
{ {
$ts = (string) microtime(true);
\Log::info('AP:inbox Update:Job invoked ' . $ts);
$activity = $this->activity; $activity = $this->activity;
$status = Status::with('media')->whereObjectUrl($activity['id'])->first(); $status = Status::with('media')->whereObjectUrl($activity['id'])->first();
if(!$status) { if(!$status) {
\Log::info('AP:inbox Update:Job notFound ' . $ts . ' activity: ' . $activity);
return; return;
} }
$this->createPreviousEdit($status); $this->createPreviousEdit($status);

View file

@ -1211,14 +1211,19 @@ class Inbox
public function handleUpdateActivity() public function handleUpdateActivity()
{ {
$ts = (string) microtime(true);
\Log::info('AP:inbox Update ' . $ts);
$activity = $this->payload['object']; $activity = $this->payload['object'];
if(!isset($activity['type'], $activity['id'])) { if(!isset($activity['type'], $activity['id'])) {
\Log::info('AP:inbox Update ma ' . $ts);
return; return;
} }
if($activity['type'] === 'Note') { if($activity['type'] === 'Note') {
\Log::info('AP:inbox Update at:Note ' . $ts);
if(Status::whereObjectUrl($activity['id'])->exists()) { if(Status::whereObjectUrl($activity['id'])->exists()) {
\Log::info('AP:inbox Update at:Note:exists ' . $ts);
StatusRemoteUpdatePipeline::dispatch($activity); StatusRemoteUpdatePipeline::dispatch($activity);
} }
} }