Skip to content

Commit

Permalink
feat: openapi新增度量能力 #9638
Browse files Browse the repository at this point in the history
  • Loading branch information
yongyiduan committed Nov 11, 2023
1 parent d700a0c commit d956057
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ import org.springframework.stereotype.Repository

@Repository
class MetricsForApiDao {

companion object {
const val batchGetLimit = Short.MAX_VALUE
}

@Suppress("ComplexMethod")
fun createOrUpdate(
dslContext: DSLContext,
Expand Down Expand Up @@ -96,7 +101,7 @@ class MetricsForApiDao {
dslContext: DSLContext
): List<MetricsApiData> {
return with(TOpenapiMetricsForApi.T_OPENAPI_METRICS_FOR_API) {
dslContext.select(API, KEY, PEAK_CONCURRENCY).from(this).skipCheck().fetch {
dslContext.select(API, KEY, PEAK_CONCURRENCY).from(this).limit(batchGetLimit).skipCheck().fetch {
MetricsApiData(
api = it.value1(),
key = it.value2(),
Expand Down

0 comments on commit d956057

Please sign in to comment.