Skip to content

Commit

Permalink
fix(platform-server): mysql username env and job timeout env
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyi.levi committed Nov 1, 2022
1 parent 677b335 commit 5a23a16
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/platform-server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MYSQL_URL=mysql://root@127.0.0.1:3306/perfsee
# or
MYSQL_PORT=3306
MYSQL_HOST=127.0.0.1
MYSQL_NAME=root
MYSQL_USERNAME=root
MYSQL_PASSWORD=
MYSQL_DB=perfsee

Expand All @@ -37,6 +37,7 @@ GITHUB_APP_PRIVATE_KEY_FILE=
JOB_POLLING_LIMIT=10
JOB_POLLING_QUEUE_LIMIT=10
JOB_POLLING_TIMEOUT_SEC=3
JOB_TIMEOUT_SEC=1800

# EMAIL
EMAIL_SMTP_HOST=
Expand Down
4 changes: 4 additions & 0 deletions packages/platform-server/src/config/def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ export interface PerfseeConfig {
* timeout for job pulling requests
*/
pollingTimeoutSec: number
/**
* timeout for job execution
*/
executionTimeoutSec: number
/**
* default job zone
*/
Expand Down
1 change: 1 addition & 0 deletions packages/platform-server/src/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const getDefaultPerfseeConfig: () => PerfseeConfig = () => ({
pollingLimit: 10,
pollingQueueLimit: 10,
pollingTimeoutSec: 5,
executionTimeoutSec: 1800,
defaultZone: 'China',
zones: ['China'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Generated by [AVA](https://avajs.dev).
artifactId: 1,
buildKey: 'test-build-key.tar',
},
timeout: 1800,
}

## should successfully update trace
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions packages/platform-server/src/modules/job/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class JobController {
job: {
jobId: job.id,
jobType: job.jobType,
timeout: this.config.job.executionTimeoutSec,
payload,
},
set: runnerUpdates,
Expand Down
6 changes: 3 additions & 3 deletions packages/platform-server/src/perfsee.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,17 @@ perfsee.project.externalProviders = ['github']
// ## 8. Job settings ##
// ###############################################################
// # maximum job pulling requests per instance can handle concurrently
// # `process.env.JOB_POLLING_LIMIT` if set
// perfsee.job.pollingLimit = 10

// # maximum job pulling requests in queue per instance, if reach polling limit
// # `process.env.JOB_POLLING_QUEUE_LIMIT` if set
// perfsee.job.pollingQueueLimit = 10

// # timeout for job pulling requests
// # `process.env.JOB_POLLING_TIMEOUT` if set
// perfsee.job.pollingTimeoutSec = 5

// # timeout for job execution
// perfsee.job.executionTimeoutSec = 30 * 60

// ###############################################################
// ## 9. Runner settings ##
// ###############################################################
Expand Down

0 comments on commit 5a23a16

Please sign in to comment.