Skip to content

Conversation

@notAreYouScared
Copy link
Member

They've been problematic from day one... no need to make them a scheduled job

They have been problematic from day one... no need to make them a scheduled job
@notAreYouScared notAreYouScared self-assigned this Mar 21, 2025
@notAreYouScared notAreYouScared requested a review from a team as a code owner March 21, 2025 22:57
@lancepioch
Copy link
Member

I agree that it's not a great solution, but we can't poll every single second either, that's even worse.

@notAreYouScared
Copy link
Member Author

I agree that it's not a great solution, but we can't poll every single second either, that's even worse.

How is 1 second worse than a webhook doing it every second? This isn't a job that runs and only runs on page view.

@lancepioch
Copy link
Member

  1. Keep the Job class
  2. Refactor Job so it's one Node per Job
  3. Use the below middleware sample code to lock unique jobs
  4. Keep the stats refreshing every 5 seconds but with the Job class
/**
 * Get the middleware the job should pass through.
 *
 * @return array<int, object>
 */
public function middleware(): array
{
    return [(new WithoutOverlapping($this->order->id))->dontRelease()];
}

@Boy132 Boy132 marked this pull request as draft April 8, 2025 10:31
@notAreYouScared
Copy link
Member Author

I still feel we should poll when they're viewing the page.... What's the point of being able to view the last 30 or whatever seconds before you view the page?

@Boy132 Boy132 removed the request for review from a team May 16, 2025 06:36
@notAreYouScared notAreYouScared marked this pull request as ready for review June 2, 2025 10:55
@notAreYouScared notAreYouScared merged commit b34778f into main Jun 3, 2025
25 checks passed
@notAreYouScared notAreYouScared deleted the charles/nuke-node-stats branch June 3, 2025 11:33
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2025
@rmartinoscar rmartinoscar linked an issue Jun 3, 2025 that may be closed by this pull request
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Queue service fails after several hours

4 participants