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

feat(api): unique cronjobs #4294

Merged
merged 1 commit into from
Nov 6, 2024
Merged

feat(api): unique cronjobs #4294

merged 1 commit into from
Nov 6, 2024

Conversation

heiytor
Copy link
Contributor

@heiytor heiytor commented Nov 6, 2024

Allow configures a cron job to prevent concurrent processing of the same job. When applied, the job will be marked as unique, meaning that another jobs cannot be enqueued or executed again until it completes or reaches a defined timeout.

@heiytor heiytor requested a review from haller33 November 6, 2024 14:56
@heiytor heiytor self-assigned this Nov 6, 2024
@heiytor heiytor marked this pull request as ready for review November 6, 2024 14:56
@heiytor heiytor requested review from a team as code owners November 6, 2024 14:56
@heiytor heiytor marked this pull request as draft November 6, 2024 14:57
@heiytor heiytor force-pushed the feat/unique-cron-job branch 2 times, most recently from 1165bed to 57bb496 Compare November 6, 2024 17:03
@heiytor heiytor marked this pull request as ready for review November 6, 2024 17:04
Introduce functionality to configure cron jobs as unique, preventing
concurrent processing of the same job. When a job is marked as unique,
it will not be enqueued or executed again until it completes or reaches
a specified timeout.

Added a new environment variable `SHELLHUB_ASYNQ_UNIQUENESS_TIMEOUT` to
control the maximum duration (in hours) a job can lock the queue. This
timeout ensures that stalled jobs do not block subsequent executions
indefinitely.
@heiytor heiytor force-pushed the feat/unique-cron-job branch from 57bb496 to d583d99 Compare November 6, 2024 17:34
@gustavosbarreto gustavosbarreto merged commit f64fb05 into master Nov 6, 2024
8 checks passed
@gustavosbarreto gustavosbarreto deleted the feat/unique-cron-job branch November 6, 2024 18:09
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

Successfully merging this pull request may close these issues.

3 participants