webcmd: MaxHistoryLines
This commit is contained in:
parent
d0fed6e4cf
commit
7dde122d9b
3
Task.go
3
Task.go
@ -85,6 +85,9 @@ func (this *App) LaunchTask(params []string) (taskRef string, err error) {
|
||||
|
||||
task := this.tasks[ref]
|
||||
task.output = append(task.output, OutputLine{isError: isError, text: text})
|
||||
if len(task.output) > 2*this.cfg.MaxHistoryLines {
|
||||
task.output = task.output[this.cfg.MaxHistoryLines:]
|
||||
}
|
||||
this.tasks[ref] = task
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
"ListenAddress": ":8192",
|
||||
|
||||
"MaxHistoryLines": 100,
|
||||
|
||||
"Commands": [
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user