details:   /erp/devel/main/rev/ea6d8848a675
changeset: 8778:ea6d8848a675
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Thu Nov 04 17:21:24 2010 +0100
summary:   fixed bug 15115: Disabling heartbeat is not working under some 
circunstances in 3.0 RC2

  Log saved in process run is truncted to 4000 characters

diffstat:

 src/org/openbravo/scheduling/ProcessRunner.java |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 0ead9342d172 -r ea6d8848a675 
src/org/openbravo/scheduling/ProcessRunner.java
--- a/src/org/openbravo/scheduling/ProcessRunner.java   Mon Nov 01 15:27:53 
2010 +0100
+++ b/src/org/openbravo/scheduling/ProcessRunner.java   Thu Nov 04 17:21:24 
2010 +0100
@@ -91,8 +91,13 @@
     } finally {
       final String duration = ProcessMonitor.getDuration(endTime - startTime);
       ProcessRequestData.update(conn, COMPLETE, requestId);
-      ProcessRunData.update(conn, ctx.getUser(), status, duration, 
bundle.getLog().toString(),
-          executionId);
+
+      // Get process log and truncate to 4000 characters if it is bigger
+      String processLog = bundle.getLog();
+      if (processLog.length() > 4000) {
+        processLog = processLog.substring(0, 3997) + "...";
+      }
+      ProcessRunData.update(conn, ctx.getUser(), status, duration, processLog, 
executionId);
     }
 
     return executionId;

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to