-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
start of multiple simultaneous goroutines #191
Comments
@Shukla-Ankur you can achieve that with Mutex or Channel simply in you code. |
robfig
pushed a commit
that referenced
this issue
Jun 17, 2019
with cross-cutting concerns Fixes #191
robfig
pushed a commit
that referenced
this issue
Jul 3, 2019
with cross-cutting concerns These JobWrappers are provided: - SkipIfStillRunning skips a job if the previous invocation is still running. - DelayIfStillRunning blocks a job invocation until the previous one is done. - Recover, to recover from panics in the job. BREAKING: This removes the default behavior of recovering from job panics. That must now be opted-into using WithChain(Recover(logger)). Having it be the default behavior can be surprising (see issue #192) and is at odds with most libraries. Fixes #191 Fixes #192
robfig
pushed a commit
that referenced
this issue
Jul 11, 2019
with cross-cutting concerns These JobWrappers are provided: - SkipIfStillRunning skips a job if the previous invocation is still running. - DelayIfStillRunning blocks a job invocation until the previous one is done. - Recover, to recover from panics in the job. BREAKING: This removes the default behavior of recovering from job panics. That must now be opted-into using WithChain(Recover(logger)). Having it be the default behavior can be surprising (see issue #192) and is at odds with most libraries. Fixes #191 Fixes #192
You can use the new SkipIfAlreadyRunning JobWrapper in v3. Please have a look and let me know if you have any problems. |
haiheipijuan
pushed a commit
to haiheipijuan/cron
that referenced
this issue
Jun 15, 2021
with cross-cutting concerns These JobWrappers are provided: - SkipIfStillRunning skips a job if the previous invocation is still running. - DelayIfStillRunning blocks a job invocation until the previous one is done. - Recover, to recover from panics in the job. BREAKING: This removes the default behavior of recovering from job panics. That must now be opted-into using WithChain(Recover(logger)). Having it be the default behavior can be surprising (see issue robfig#192) and is at odds with most libraries. Fixes robfig#191 Fixes robfig#192
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my code, I try to connect to MySQL DB (within a cron function). In cases when this connection establishing takes time, cron starts running the registered function in another goroutine.
Is there any way to ensure that if a gorotuine has already been started, do not start a new one unless the previous one finishes?
The text was updated successfully, but these errors were encountered: