Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using queue interprop as abstraction for queues #50

Closed
makasim opened this issue Jan 26, 2018 · 2 comments
Closed

Consider using queue interprop as abstraction for queues #50

makasim opened this issue Jan 26, 2018 · 2 comments

Comments

@makasim
Copy link

makasim commented Jan 26, 2018

Hello!

Please look at https://github.com/queue-interop/queue-interop project. Using interfaces from it allows us reuse some implementations like enqueue, which supports a lot of transports. You can outsource some code

@BenceSzalai
Copy link

BenceSzalai commented Jul 11, 2020

Thinking about this, what do you think the minimum viable implementation would be?

Do you mean just to split WP_Background_Process into few classes, each implementing one of these:

  • a Queue to store the queued items in the db
  • a Producer to be able to add items to the queue
  • a Consumer to be able to retrieve and process those items

Are there any other interfaces needed?

Or do you mean WP_Background_Process would become a Context implementation and the dev working with WP_Background_Process would become responsible to create suitable Queues, Producers and Consumers (probably providing some defaults or in case of the Consumer an abstract class, where the actual processing can be defined in a child just like right now the WP_Background_Process::task() abstract method).

How could the project make sure that it continues to work in a standalone way as well, when there is no MQ implementation available for the WP site?

Could you please elaborate a bit on your ideal design for this idea?

@ianmjones
Copy link
Member

Closing ancient issue. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants