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

Using Queue::DBI in multiprocess enviroment #4

Open
ekaftan opened this issue Aug 23, 2016 · 0 comments
Open

Using Queue::DBI in multiprocess enviroment #4

ekaftan opened this issue Aug 23, 2016 · 0 comments

Comments

@ekaftan
Copy link

ekaftan commented Aug 23, 2016

I've been trying all day to use Queue::DBI as a queueing system in a multiprocess application. I can only make it work once and then I have to undef the queue object or restart the process to get more items from the queue.

I think I found why... there is a cache that stores the 'max_id' and never tries to get another item from the queue unless its undefined. It does undefine it if I enqueue something...

    # We need to reset the internal cached value preventing infinite loops, other-
    # wise this new element will not be taken into account by the current queue
    # object.
    $self->{'max_id'} = undef;

My problem is that I am queueing in one process and reading in another, so the reader never gets the message.

Is what I am doing outside the scope of Queue::DBI?
If I just 'undef' the variable will I break something else?

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

1 participant