mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
set default log expire time to 1 day
This commit is contained in:
@@ -213,8 +213,8 @@ func SetLogConfig(wg *sync.WaitGroup, cmd *exec.Cmd, t model.Task, u model.User)
|
||||
// expire duration (in seconds)
|
||||
expireDuration := u.Setting.LogExpireDuration
|
||||
if expireDuration == 0 {
|
||||
// by default not expire
|
||||
expireDuration = constants.Infinite
|
||||
// by default 1 day
|
||||
expireDuration = 3600 * 24
|
||||
}
|
||||
|
||||
// read stdout
|
||||
|
||||
@@ -91,6 +91,9 @@ const user = {
|
||||
if (!response.data.data.setting.max_error_log) {
|
||||
response.data.data.setting.max_error_log = 1000
|
||||
}
|
||||
if (!response.data.data.setting.log_expire_duration) {
|
||||
response.data.data.setting.log_expire_duration = 3600 * 24
|
||||
}
|
||||
commit('SET_USER_INFO', response.data.data)
|
||||
window.localStorage.setItem('user_info', JSON.stringify(response.data.data))
|
||||
})
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
v-model="userInfo.setting.log_expire_duration"
|
||||
clearable
|
||||
>
|
||||
<el-option :value="0" :label="$t('No Expire')"/>
|
||||
<el-option :value="99999999" :label="$t('No Expire')"/>
|
||||
<el-option :value="3600" :label="'1 ' + $t('Hour')"/>
|
||||
<el-option :value="3600 * 6" :label="'6 ' + $t('Hours')"/>
|
||||
<el-option :value="3600 * 12" :label="'12 ' + $t('Hours')"/>
|
||||
|
||||
Reference in New Issue
Block a user