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

Cron2 unique option not working as expected #2699

Open
taifu opened this issue Jan 7, 2025 · 0 comments
Open

Cron2 unique option not working as expected #2699

taifu opened this issue Jan 7, 2025 · 0 comments

Comments

@taifu
Copy link

taifu commented Jan 7, 2025

I am using uWSGI with Django, and I configured a cron2 line in my vassal to run a management command every 5 minutes. I enabled the unique option to ensure the command does not run concurrently, as it sometimes takes longer than 5 minutes to complete.

However, I discovered that the unique option does not work as expected. To confirm this, I wrote a simple management command that writes to a file and scheduled it to run every minute. Here's the output I observed:

PID 5925 ============
PID 5925 Parent PID 5924
PID 5925 Worker PID 32284
PID 5925 Sleep 90
PID 6068 ============
PID 6068 Parent PID 6067
PID 6068 Worker PID 32284
PID 6068 Sleep 90
PID 5925 Exiting
PID 6068 Exiting

As you can see, process 6068 starts executing before process 5925 has exited.

Could it be that I have two workers executing the command concurrently?

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