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

the lock in send_all() [engine.py Line 41] doesn't work #69

Closed
chowyi opened this issue Sep 29, 2016 · 1 comment
Closed

the lock in send_all() [engine.py Line 41] doesn't work #69

chowyi opened this issue Sep 29, 2016 · 1 comment
Labels

Comments

@chowyi
Copy link

chowyi commented Sep 29, 2016

not sure it's a pinax.notifications issue:

In the function send_all() of file engine.py ,
the lock seems have no effect.
when lock is None, the code below can still run.

def send_all(*args):
    lock = acquire_lock(*args)
    batches, sent, sent_actual = 0, 0, 0
    start_time = time.time()
    ……

Did I use it in the wrong way ? Thank you.

@grahamu
Copy link

grahamu commented Oct 29, 2017

Good catch @chowyi, I noticed the same issue when running simultaneous tests. I believe the solution is wrapping subsequent send_all() code in an if lock: conditional.

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