mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-13 18:55:34 +02:00
Added timeout for history saving
This commit is contained in:
parent
7afaba99a4
commit
4d2e90a455
1 changed files with 1 additions and 0 deletions
|
@ -485,6 +485,7 @@ export class Agent {
|
||||||
if (res) {
|
if (res) {
|
||||||
await this.history.add('system', `Task ended with score : ${res.score}`);
|
await this.history.add('system', `Task ended with score : ${res.score}`);
|
||||||
await this.history.save();
|
await this.history.save();
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 3000)); // Wait 3 second for save to complete
|
||||||
console.log('Task finished:', res.message);
|
console.log('Task finished:', res.message);
|
||||||
this.killAll();
|
this.killAll();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue