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

Non-idempotent jobs do not ever show as exit on a Redis broker #45

Closed
0xDEC0DE opened this issue May 10, 2024 · 2 comments
Closed

Non-idempotent jobs do not ever show as exit on a Redis broker #45

0xDEC0DE opened this issue May 10, 2024 · 2 comments

Comments

@0xDEC0DE
Copy link
Contributor

Steps to reproduce

Prep

In one window:

docker-compose -f spinach/tests/docker-compose.yml up -d
docker-compose -f spinach/tests/docker-compose.yml exec redis redis-cli

Test

In another window:

import spinach
sp = spinach.Engine(spinach.RedisBroker())

@sp.task(name='hi_mom')
def hi_mom():
    print("Hi mom.")

sp.schedule('hi_mom')
sp.start_workers(stop_when_queue_empty=True)

Check

In the first window:

KEYS *

Expected result

An empty result, or an idempotency key.

Actual behavior

A _running-jobs-on-broker-* key is listed in the output. Its contents are the job that just finished, claiming to still be running.

0xDEC0DE pushed a commit to 0xDEC0DE/spinach that referenced this issue May 10, 2024
Adds a test that the running job is actually gone.

Fixes: Issue NicolasLM#45
@juledwar
Copy link
Contributor

juledwar commented Jun 3, 2024

Can you close this @0xDEC0DE , I don't have the powers.

@0xDEC0DE
Copy link
Contributor Author

0xDEC0DE commented Jun 3, 2024

Fixed in #46

@0xDEC0DE 0xDEC0DE closed this as completed Jun 3, 2024
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

2 participants