File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
dokgen/src/main/kotlin/org/openrndr/dokgen Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,22 @@ abstract class MediaRunnerWorkAction : WorkAction<MediaRunnerWorkParameters> {
99 abstract val execOperations: ExecOperations
1010
1111 override fun execute () {
12- try {
13- execOperations.javaexec {
14- it.classpath(parameters.classPath.get())
15- it.jvmArgs = parameters.jvmArgs.get()
16- it.mainClass.set(parameters.mainClass)
12+ for (i in 0 until 10 ) {
13+ try {
14+ execOperations.javaexec {
15+ it.classpath(parameters.classPath.get())
16+ it.jvmArgs = parameters.jvmArgs.get()
17+ it.mainClass.set(parameters.mainClass)
18+ }
19+ break
20+ } catch (e: Exception ) {
21+ if (i == 9 ) {
22+ throw RuntimeException (e)
23+ } else {
24+ System .err.println (" Failed to run media example, retrying in a second..." )
25+ Thread .sleep(1000 )
26+ }
1727 }
18- } catch (e: Exception ) {
19- throw RuntimeException (e)
2028 }
2129 }
22- }
30+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ org.gradle.jvmargs=-Xmx2G -XX:+UseParallelGC
77# https://kotlinlang.org/docs/gradle.html#check-for-jvm-target-compatibility-of-related-compile-tasks
88kotlin.jvm.target.validation.mode =error
99org.gradle.parallel =true
10+ org.gradle.workers.max =4
1011org.gradle.caching =true
1112# org.gradle.configuration-cache=true
1213# org.gradle.configuration-cache.problems=warn
You can’t perform that action at this time.
0 commit comments