only bail if the worker is done on longRunningTask, already running must always run

This commit is contained in:
servertood
2008-11-22 04:44:06 +00:00
parent c6544e0ce0
commit 14dc9cf23d
2 changed files with 9 additions and 6 deletions

View File

@@ -20,7 +20,7 @@
if ( event == "longRunningTask" || event == "alreadyRunning")
{
if ( worker.isDone() )
if ( worker.isDone() && event=="longRunningTask" )
return;
if ( tableName.equals((String)context.get("currentTable")) &&
@@ -63,10 +63,10 @@
DB.Result tables = db.execute("show full columns from `" + arg("dbName") + "`.`" + arg("tableName") + "`");
/*try
try
{
Thread.sleep(5000);
} catch (Exception e) {}*/
} catch (Exception e) {}
publish(tables);

View File

@@ -18,11 +18,14 @@
if (event == "longRunningTask" || event == "alreadyRunning" )
{
if ( worker.isDone() )
if ( worker.isDone() && event == "longRunningTask" )
return;
log.info("currentDB: " + dbName + "=" + context.get("currentDB"));
if ( dbName.equals((String)context.get("currentDB")))
{
log.info("updating banner");
banner.setText("Database " + dbName + ": (loading)");
banner = context.get("/mainTabs/Query/toolbar/banner");
banner.setText("SQL query on database: " + dbName);
@@ -51,10 +54,10 @@
DB.Result databases = db.execute("show table status from `" + arg("dbName") + "`");
/*try
try
{
Thread.sleep(10000);
} catch (Exception e) {}*/
} catch (Exception e) {}
publish(databases);