Skip to content

Commit 253af6b

Browse files
Flush only after 5 seconds
1 parent ed5ace0 commit 253af6b

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

kratos.gid/kratos.tcl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ proc Kratos::InitGlobalVariables {dir} {
159159
array set kratos_private [ReadProblemtypeXml [file join $kratos_private(Path) kratos.xml] Infoproblemtype {Name Version CheckMinimumGiDVersion}]
160160
# Version of the kratos executable
161161
set kratos_private(exec_version) "dev"
162-
# Get the exec version
163-
Kratos::GetExecVersion
164162
}
165163

166164
proc Kratos::LoadCommonScripts { } {

kratos.gid/scripts/Logs.tcl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ proc Kratos::Log {msg} {
4242

4343
proc Kratos::FlushLog { } {
4444
variable kratos_private
45+
W "Hey"
4546
if {[info exists kratos_private(Log)]} {
4647
if {[llength $kratos_private(Log)] > 0} {
4748
set logpath [Kratos::GetLogFilePath]
@@ -60,10 +61,14 @@ proc Kratos::FlushLog { } {
6061
set kratos_private(Log) [list ]
6162
}
6263
}
63-
after 5000 {Kratos::FlushLog}
6464

6565
}
6666

67+
proc Kratos::AutoFlush {} {
68+
Kratos::FlushLog
69+
after 5000 {Kratos::AutoFlush}
70+
}
71+
6772
proc Kratos::ViewLog {} {
6873
package require gid_cross_platform
6974
FlushLog
@@ -73,6 +78,6 @@ proc Kratos::ViewLog {} {
7378
#do not save preferences starting with flag gid.exe -c (that specify read only an alternative file)
7479
if { [GiD_Set SaveGidDefaults] } {
7580
Kratos::InitLog
76-
Kratos::FlushLog
81+
Kratos::AutoFlush
7782
}
7883

kratos.gid/scripts/Utils.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ proc Kratos::LoadEnvironment { } {
190190
# LOGS
191191

192192
proc Kratos::LogInitialData { } {
193+
194+
# Get the exec version
195+
Kratos::GetExecVersion
196+
193197
set initial_data [dict create]
194198
dict set initial_data GiD_version [GiD_Info gidversion]
195199
dict set initial_data problemtype_git_hash "68418871cff2b897f7fb9176827871b339fe5f91"

0 commit comments

Comments
 (0)