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

Prefixes are not properly documented #37

Open
Madeorsk opened this issue May 29, 2020 · 2 comments
Open

Prefixes are not properly documented #37

Madeorsk opened this issue May 29, 2020 · 2 comments
Labels

Comments

@Madeorsk
Copy link

Expected Behavior

I tried to use a prefix. So I defined it while running my workers, and then I tried to use the same prefix when enqueuing.

Current Behavior

But it did not work, because the $prefix argument of this function is not the same thing.

Possible Solution

Document Resque_Redis::prefix in this part https://github.com/resque/php-resque#custom-prefix

Suggestion

If these two prefixes are not the same thing, I suggest to rename one. In another library, what you call "prefix" is called "namespace".

@Madeorsk Madeorsk added the bug label May 29, 2020
@lynndylanhurley
Copy link

@Madeorsk how do prefixes work exactly? I'm trying to do exactly what you attempted with prefixes but my jobs are not being run. What is the correct way to implement?

@Madeorsk
Copy link
Author

Madeorsk commented Feb 9, 2021

@lynndylanhurley
As it is documented on the link pasted here, use PREFIX=my-app-name bin/resque to start a worker for a specific prefix.

To enqueue tasks for this prefix, you need to use Resque_Redis::prefix before enqueuing. Here is a sample code where PREFIX=foo.

\Resque_Redis::prefix("foo");

\Resque::enqueue("myjobs", Job::class, [
	"arg" => "hello world",
]);

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

No branches or pull requests

2 participants