Subversion Repositories DevTools

Rev

Rev 882 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 882 Rev 886
Line 38... Line 38...
38
  {
38
  {
39
    Integer id = new Integer(mRtagId);
39
    Integer id = new Integer(mRtagId);
40
    setName(id.toString());
40
    setName(id.toString());
41
    mLogger.debug("run");
41
    mLogger.debug("run");
42
    boolean exit = false;
42
    boolean exit = false;
43
    boolean insertRunLevel = true;
-
 
44
    RippleEngine rippleEngine = new RippleEngine(mReleaseManager, mRtagId, true);
43
    RippleEngine rippleEngine = new RippleEngine(mReleaseManager, mRtagId, true);
45
    MutableString buildFileContent = new MutableString();
44
    MutableString buildFileContent = new MutableString();
46
 
45
 
47
    while(!exit)
46
    while(!exit)
48
    {
47
    {
49
      try
48
      try
50
      {
49
      {
-
 
50
        sleepCheck();
51
        rippleEngine.collectMetaData();
51
        rippleEngine.collectMetaData();
52
        
52
        
53
        if ( Thread.currentThread().isInterrupted() )
53
        if ( Thread.currentThread().isInterrupted() )
54
        {
54
        {
55
          mLogger.warn("run is interrupted");
55
          mLogger.warn("run is interrupted");
Line 63... Line 63...
63
        }
63
        }
64
        
64
        
65
        // allowed to proceed
65
        // allowed to proceed
66
        if ( mGbebuildfilter.compareTo("unit test consume build files") != 0)
66
        if ( mGbebuildfilter.compareTo("unit test consume build files") != 0)
67
        {
67
        {
68
          if ( insertRunLevel )
-
 
69
          {
-
 
70
            mRunLevel = RunLevel.IDLE;
68
          mRunLevel = RunLevel.IDLE;
71
            mLogger.warn("run changing run level to IDLE for rcon_id " + mRconId);
69
          mLogger.warn("run changing run level to IDLE for rcon_id " + mRconId);
72
            mRunLevel.persistNew(mReleaseManager, mRconId);
70
          mRunLevel.persistNew(mReleaseManager, mRconId);
73
            insertRunLevel = false;
-
 
74
          }
71
 
75
          mLogger.warn("run checking allowedToProceed");
72
          mLogger.warn("run checking allowedToProceed");
76
          allowedToProceed(false);
73
          allowedToProceed(false);
77
          mLogger.info("run allowedToProceed returned");
74
          mLogger.info("run allowedToProceed returned");
78
        }
75
        }
79
        
76
        
-
 
77
        mRunLevel = RunLevel.WAITING;
-
 
78
        mLogger.warn("run changing run level to WAITING for rcon_id " + mRconId);
-
 
79
        mRunLevel.persist(mReleaseManager, mRconId);
-
 
80
 
80
        // consume build files
81
        // consume build files
81
        mLogger.warn("run consume build files");
82
        mLogger.warn("run consume build files");
82
        buildFileContent.value = "";
83
        buildFileContent.value = "";
83
        boolean logWarning = true;
84
        boolean logWarning = true;
84
        
85
        
Line 195... Line 196...
195
      }
196
      }
196
      catch( SQLException e )
197
      catch( SQLException e )
197
      {
198
      {
198
        // oracle connection issues        
199
        // oracle connection issues        
199
         mLogger.warn("run oracle connection issues");
200
         mLogger.warn("run oracle connection issues");
200
         mSleep = true;
201
         mException = true;
201
      }
202
      }
202
      catch( ExitException e )
203
      catch( ExitException e )
203
      {
204
      {
204
        mLogger.warn("run ExitException");
205
        mLogger.warn("run ExitException");
205
        exit = true;
206
        exit = true;
Line 219... Line 220...
219
          {
220
          {
220
            // notify first
221
            // notify first
221
            // many reasons for indefinite pause, including database related, so do database last
222
            // many reasons for indefinite pause, including database related, so do database last
222
            indefinitePause(rippleEngine, cause);
223
            indefinitePause(rippleEngine, cause);
223
            mReleaseManager.indefinitePause();
224
            mReleaseManager.indefinitePause();
-
 
225
            // DEVI 51366 force sleep at beginning of while loop
-
 
226
            mException = true;
224
          }
227
          }
225
          catch( Exception f )
228
          catch( Exception f )
226
          {
229
          {
227
            mLogger.error("run indefinitePause failed");
230
            mLogger.error("run indefinitePause failed");
228
          }
231
          }