# Conflicts: # lab-plugin/lab-workflow/src/main/java/org/springblade/plugin/workbench/service/impl/AutoStartModelServiceImpl.javamain
commit
d7af3dd2ff
12 changed files with 220 additions and 56 deletions
@ -0,0 +1,30 @@ |
||||
package org.springblade.plugin.config; |
||||
|
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.scheduling.annotation.EnableAsync; |
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
||||
|
||||
import java.util.concurrent.Executor; |
||||
import java.util.concurrent.ThreadPoolExecutor; |
||||
|
||||
/** |
||||
* @Description 自定义线程池 |
||||
* @Author ytl |
||||
* @Date 2023/3/17 0017 9:21 |
||||
*/ |
||||
@Configuration |
||||
@EnableAsync |
||||
public class TskPoolConfig { |
||||
@Bean("taskExecutor") |
||||
public Executor taskExecutor() { |
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
||||
executor.setCorePoolSize(10); |
||||
executor.setMaxPoolSize(20); |
||||
executor.setQueueCapacity(200); |
||||
executor.setKeepAliveSeconds(60); |
||||
executor.setThreadNamePrefix("taskExecutor-"); |
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); |
||||
return executor; |
||||
} |
||||
} |
||||
@ -0,0 +1,22 @@ |
||||
package org.springblade.plugin.workbench.feign; |
||||
|
||||
import org.springblade.core.log.model.LogError; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
||||
/** |
||||
* @Description |
||||
* @Author ytl |
||||
* @Date 2023/3/16 0016 13:41 |
||||
*/ |
||||
@FeignClient( |
||||
value = "blade-log" |
||||
) |
||||
public interface ProcessErrorLogClient { |
||||
String API_PREFIX = "/log/saveErrorLog"; |
||||
|
||||
@PostMapping(API_PREFIX) |
||||
void saveErrorLog(@RequestBody LogError logError); |
||||
|
||||
} |
||||
Loading…
Reference in new issue