Added checMarkedRest parameter.                                   d348420
330143
public ContainerAS getCurrentSessionalUOW(boolean checkMarkedReset) throws CSIException, CSITransactionRolledbackException {
        ContainerAS result = null;
        Object currASKey = uowCtrl.getCurrentSessionalUOW(checkMarkedReset);

        //---------------------------------------------------------
        // No activity session available in after_completion callbacks.
        // Okay to return null in this case.
        //---------------------------------------------------------

        if (currASKey == null) {
            return null;
        }

        result = containerASMap.get(currASKey);
        if (result == null) {
            result = new ContainerAS(this, currASKey);
            uowCtrl.enlistWithSession(result);
            containerASMap.put(currASKey, result);
        }

        return result;
    }
747798
@Override
    @Path("/{roleName}/users/{cuid}")
    @ApiOperation(value="Create a role or add a user to an existing role",
        notes="If users/{cuid} is present, user is added to role.", response=StatusMessage.class)
    @ApiImplicitParams({
        @ApiImplicitParam(name="Workgroup", paramType="body", dataType="com.centurylink.mdw.model.user.Role")})
    public JSONObject post(String path, JSONObject content, Map<String,String> headers)
    throws ServiceException, JSONException {
        String name = getSegment(path, 1);
        String rel = getSegment(path, 2);

        UserServices userServices = ServiceLocator.getUserServices();
        try {
            Role existing = userServices.getRoles().get(name);

            if (rel == null) {
                if (existing != null)
                    throw new ServiceException(HTTP_409_CONFLICT, "Role name already exists: " + name);
                Role role = new Role(content);
                userServices.createRole(role);
            }
            else if (rel.equals("users")) {
                String cuid = getSegment(path, 3);
                User user = UserGroupCache.getUser(cuid);
                if (user == null) {
                    throw new CachingException("Cannot find user: " + cuid);
                }
                if (user.hasRole(name))  // in case added elsewhere
                    throw new ServiceException(HTTP_409_CONFLICT, "User " + cuid + " already has role " + name);

                userServices.addUserToRole(cuid, name);
            }
            else {
                String msg = "Unsupported relationship for role " + name + ": " + rel;
                throw new ServiceException(HTTP_400_BAD_REQUEST, msg);
            }
            return null;
        }
        catch (DataAccessException ex) {
            throw new ServiceException(HTTP_500_INTERNAL_ERROR, ex.getMessage(), ex);
        }
        catch (CachingException ex) {
            throw new ServiceException(HTTP_500_INTERNAL_ERROR, ex.getMessage(), ex);
        }
    }
317384
@Override
    public ArtifactoryResponse restCall(ArtifactoryRequest artifactoryRequest) throws IOException {
        HttpRequestBase httpRequest;

        String requestPath = "/" + artifactoryRequest.getApiUrl();
        ContentType contentType = Util.getContentType(artifactoryRequest.getRequestType());

        String queryPath = "";
        if (!artifactoryRequest.getQueryParams().isEmpty()) {
            queryPath = Util.getQueryPath("?", artifactoryRequest.getQueryParams());
        }

        switch (artifactoryRequest.getMethod()) {
            case GET:
                httpRequest = new HttpGet();

                break;

            case POST:
                httpRequest = new HttpPost();
                setEntity((HttpPost)httpRequest, artifactoryRequest.getBody(), contentType);

                break;

            case PUT:
                httpRequest = new HttpPut();
                setEntity((HttpPut)httpRequest, artifactoryRequest.getBody(), contentType);

                break;

            case DELETE:
                httpRequest = new HttpDelete();

                break;

            case PATCH:
                httpRequest = new HttpPatch();
                setEntity((HttpPatch)httpRequest, artifactoryRequest.getBody(), contentType);
                break;

            case OPTIONS:
                httpRequest = new HttpOptions();
                break;

            default:
                throw new IllegalArgumentException("Unsupported request method.");
        }

        httpRequest.setURI(URI.create(url + requestPath + queryPath));
        addAccessTokenHeaderIfNeeded(httpRequest);

        if (contentType != null) {
            httpRequest.setHeader("Content-type", contentType.getMimeType());
        }

        Map<String, String> headers = artifactoryRequest.getHeaders();
        for (String key : headers.keySet()) {
            httpRequest.setHeader(key, headers.get(key));
        }

        HttpResponse httpResponse = httpClient.execute(httpRequest);
        return new ArtifactoryResponseImpl(httpResponse);
    }
855825
public final void classCreatorRest() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:680:5: ( arguments )
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:680:7: arguments
			{
			pushFollow(FOLLOW_arguments_in_classCreatorRest4137);
			arguments();
			state._fsp--;
			if (state.failed) return;
			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
953659
def post(method, hmc, uri, uri_parms, body, logon_required,
             wait_for_completion):
        """"""
        assert wait_for_completion is True  # synchronous operation
        partition_oid = uri_parms[0]
        partition_uri = '/api/partitions/' + partition_oid
        try:
            partition = hmc.lookup_by_uri(partition_uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        cpc = partition.manager.parent
        assert cpc.dpm_enabled
        check_valid_cpc_status(method, uri, cpc)
        check_partition_status(method, uri, partition,
                               invalid_statuses=['starting', 'stopping'])

        # Parse and check required query parameters
        query_parms = parse_query_parms(method, uri, uri_parms[1])
        try:
            image_name = query_parms['image-name']
        except KeyError:
            raise BadRequestError(
                method, uri, reason=1,
                message="Missing required URI query parameter 'image-name'")
        try:
            ins_file_name = query_parms['ins-file-name']
        except KeyError:
            raise BadRequestError(
                method, uri, reason=1,
                message="Missing required URI query parameter 'ins-file-name'")

        # Reflect the effect of mounting in the partition properties
        partition.properties['boot-iso-image-name'] = image_name
        partition.properties['boot-iso-ins-file'] = ins_file_name
        return {}
183729
@Override
    public void postInitModule() throws ModuleInitializationException {

        super.postInitModule();

        // validate required param: GSEARCH_REST_URL
        _gSearchRESTURL = getParameter(GSEARCH_REST_URL);
        if (_gSearchRESTURL == null) {
            throw new ModuleInitializationException("Required parameter, "
                    + GSEARCH_REST_URL + " was not specified", getRole());
        } else {
            try {
                new URL(_gSearchRESTURL);
                logger.debug("Configured GSearch REST URL: " + _gSearchRESTURL);
            } catch (MalformedURLException e) {
                throw new ModuleInitializationException("Malformed URL given "
                        + "for " + GSEARCH_REST_URL + " parameter: "
                        + _gSearchRESTURL, getRole());
            }
        }

        // validate credentials: if GSEARCH_USERNAME is given, GSEARCH_PASSWORD
        // should also be.
        String user = getParameter(GSEARCH_USERNAME);
        if (user != null) {
            logger.debug("Will authenticate to GSearch service as user: " + user);
            String pass = getParameter(GSEARCH_PASSWORD);
            if (pass != null) {
                _gSearchCredentials =
                        new UsernamePasswordCredentials(user, pass);
            } else {
                throw new ModuleInitializationException(GSEARCH_PASSWORD
                        + " must be specified because " + GSEARCH_USERNAME
                        + " was specified", getRole());
            }
        } else {
            logger.debug(GSEARCH_USERNAME + " unspecified; will not attempt "
                    + "to authenticate to GSearch service");
        }

        // finally, init the http client we'll use
        _webClientConfig = getServer().getWebClientConfig();
        _webClient = new WebClient(_webClientConfig);
    }
87234
def touch(self, pathobj):
        
        if not pathobj.drive or not pathobj.root:
            raise RuntimeError('Full path required')

        if pathobj.exists():
            return

        url = str(pathobj)
        text, code = self.rest_put(url, session=pathobj.session, verify=pathobj.verify, cert=pathobj.cert)

        if not code == 201:
            raise RuntimeError("%s %d" % (text, code))
721658
public void starting() throws Exception {
		this.logger.fine( "iPojo registers REST and icons servlets related to Roboconf's DM." );

		// Create the REST application with its resources.
		// The scheduler may be null, it is optional.
		this.app = new RestApplication( this.manager );
		this.app.setScheduler( this.scheduler );
		this.app.setMavenResolver( this.mavenResolver );
		this.app.enableCors( this.enableCors );
		this.app.setAuthenticationManager( this.authenticationMngr );

		Dictionary<String,String> initParams = new Hashtable<> ();
		initParams.put( "servlet-name", "Roboconf DM (REST)" );

		this.jerseyServlet = new ServletContainer( this.app );
		this.httpService.registerServlet( REST_CONTEXT, this.jerseyServlet, initParams, null );

		// Deal with the icons servlet
		initParams = new Hashtable<> ();
		initParams.put( "servlet-name", "Roboconf DM (icons)" );

		IconServlet iconServlet = new IconServlet( this.manager );
		this.httpService.registerServlet( ICONS_CONTEXT, iconServlet, initParams, null );

		// Register the web socket
		initParams = new Hashtable<> ();
		initParams.put( "servlet-name", "Roboconf DM (websocket)" );

		RoboconfWebSocketServlet websocketServlet = new RoboconfWebSocketServlet();
		this.httpService.registerServlet( WEBSOCKET_CONTEXT, websocketServlet, initParams, null );

		// Register a filter for authentication
		this.authenticationFilter = new AuthenticationFilter( this );
		this.authenticationFilter.setAuthenticationEnabled( this.enableAuthentication );
		this.authenticationFilter.setAuthenticationManager( this.authenticationMngr );
		this.authenticationFilter.setSessionPeriod( this.sessionPeriod );
		this.authenticationFilter.setEnableCors( this.enableCors );

		initParams = new Hashtable<> ();
		initParams.put( "urlPatterns", "*" );

		// Consider the bundle context can be null (e.g. when used outside of OSGi)
		if( this.bundleContext != null )
			this.filterServiceRegistration = this.bundleContext.registerService( Filter.class, this.authenticationFilter, initParams );
		else
			this.logger.warning( "No bundle context was available, the authentication filter was not registered." );
	}
184126
function claimBackOldTextcoins(to_address, days){
	db.query(
		"SELECT mnemonic FROM sent_mnemonics LEFT JOIN unit_authors USING(address) \n\
		WHERE mnemonic!='' AND unit_authors.address IS NULL AND creation_date<"+db.addTime("-"+days+" DAYS"),
		function(rows){
			async.eachSeries(
				rows,
				function(row, cb){
					receiveTextCoin(row.mnemonic, to_address, function(err, unit, asset){
						if (err)
							console.log("failed claiming back old textcoin "+row.mnemonic+": "+err);
						else
							console.log("claimed back mnemonic "+row.mnemonic+", unit "+unit+", asset "+asset);
						cb();
					});
				}
			);
		}
	);
}
621538
@Override
    @Path("/{cuid}/rel/{relId}")
    @ApiOperation(value="Create a user or add existing user to a workgroup or role",
        notes="If rel/{relId} is present, user is added to workgroup or role.", response=StatusMessage.class)
    @ApiImplicitParams({
        @ApiImplicitParam(name="Workgroup", paramType="body", dataType="com.centurylink.mdw.model.user.User")})
    public JSONObject post(String path, JSONObject content, Map<String, String> headers)
    throws ServiceException, JSONException {
        String cuid = getSegment(path, 1);
        String rel = getSegment(path, 2);

        UserServices userServices = ServiceLocator.getUserServices();
        try {
            if (rel == null) {
                User existing = userServices.getUsers().get(cuid);
                if (existing != null)
                    throw new ServiceException(HTTP_409_CONFLICT, "User ID already exists: " + cuid);
                User user = new User(content);
                userServices.createUser(user);
            }
            else if (rel.equals("workgroups")) {
                String group = getSegment(path, 3);
                userServices.addUserToWorkgroup(cuid, group);
            }
            else if (rel.equals("roles")) {
                String role = getSegment(path, 3);
                userServices.addUserToRole(cuid, role);
            }
            else {
                String msg = "Unsupported relationship for user " + cuid + ": " + rel;
                throw new ServiceException(HTTP_400_BAD_REQUEST, msg);
            }
            return null;
        }
        catch (DataAccessException ex) {
            if (ex.getCode() >= HTTP_400_BAD_REQUEST)
                throw new ServiceException(ex.getCode(), ex.getMessage(), ex);
            else
                throw new ServiceException(HTTP_500_INTERNAL_ERROR, ex.getMessage(), ex);
        }
    }
36825
function postRest(uri) {
    var callback = preConditions.getCallback(arguments[arguments.length - 1]);
    var options;

    showWarning();

    options = {
      path: uri,
      method: 'POST',
      payload: (arguments[1] !== undefined && typeof arguments[1] !== 'function') ? arguments[1] : {},
      config: {
        qs: (arguments[2] !== undefined && typeof arguments[2] !== 'function') ? arguments[2] : {}
      }
    };

    return requestManager.generateAccessToken(function (err) {
      // Return callback if an error ocurr getting the access_token
      if (err) return callback.apply(null, [err, null]);
      return false;
    }).then(function (accessToken) {
      options.access_token = accessToken;
      return requestManager.exec(options, callback);
    });
  }
911552
void reportRestoredCheckpoint(RestoredCheckpointStats restored) {
		checkNotNull(restored, "Restored checkpoint");

		statsReadWriteLock.lock();
		try {
			counts.incrementRestoredCheckpoints();
			latestRestoredCheckpoint = restored;

			dirty = true;
		} finally {
			statsReadWriteLock.unlock();
		}
	}
135137
public static void validateStatusAtExecutionRestart(long previousExecutionId,
                                                        Properties restartJobParameters) throws JobRestartException, JobExecutionNotMostRecentException, JobExecutionAlreadyCompleteException {
        Helper helper = new Helper(previousExecutionId, restartJobParameters);
        helper.validateRestartableFalseJobsDoNotRestart();
        helper.validateJobExecutionIsMostRecent();
        helper.validateJobNotCompleteOrAbandonded();
        helper.validateJobInstanceFailedOrStopped();
        //Added starting since execution is now created on the Dispatcher
        helper.validateJobExecutionFailedOrStoppedOrStarting();
        helper.validateStepsAndPartitionsInNonFinalStates();
    }
308888
public final void genericMethodOrConstructorRest() throws RecognitionException {
		int genericMethodOrConstructorRest_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 24) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:379:5: ( ( type | 'void' ) Identifier methodDeclaratorRest | Identifier constructorDeclaratorRest )
			int alt38=2;
			int LA38_0 = input.LA(1);
			if ( (LA38_0==Identifier) ) {
				int LA38_1 = input.LA(2);
				if ( (LA38_1==Identifier||LA38_1==47||LA38_1==53||LA38_1==59) ) {
					alt38=1;
				}
				else if ( (LA38_1==36) ) {
					alt38=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 38, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}
			else if ( (LA38_0==65||LA38_0==67||LA38_0==71||LA38_0==77||LA38_0==85||LA38_0==92||LA38_0==94||LA38_0==105||LA38_0==118) ) {
				alt38=1;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 38, 0, input);
				throw nvae;
			}

			switch (alt38) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:379:7: ( type | 'void' ) Identifier methodDeclaratorRest
					{
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:379:7: ( type | 'void' )
					int alt37=2;
					int LA37_0 = input.LA(1);
					if ( (LA37_0==Identifier||LA37_0==65||LA37_0==67||LA37_0==71||LA37_0==77||LA37_0==85||LA37_0==92||LA37_0==94||LA37_0==105) ) {
						alt37=1;
					}
					else if ( (LA37_0==118) ) {
						alt37=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return;}
						NoViableAltException nvae =
							new NoViableAltException("", 37, 0, input);
						throw nvae;
					}

					switch (alt37) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:379:8: type
							{
							pushFollow(FOLLOW_type_in_genericMethodOrConstructorRest801);
							type();
							state._fsp--;
							if (state.failed) return;
							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:379:15: 'void'
							{
							match(input,118,FOLLOW_118_in_genericMethodOrConstructorRest805); if (state.failed) return;
							}
							break;

					}

					match(input,Identifier,FOLLOW_Identifier_in_genericMethodOrConstructorRest808); if (state.failed) return;
					pushFollow(FOLLOW_methodDeclaratorRest_in_genericMethodOrConstructorRest810);
					methodDeclaratorRest();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:380:7: Identifier constructorDeclaratorRest
					{
					match(input,Identifier,FOLLOW_Identifier_in_genericMethodOrConstructorRest818); if (state.failed) return;
					pushFollow(FOLLOW_constructorDeclaratorRest_in_genericMethodOrConstructorRest820);
					constructorDeclaratorRest();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 24, genericMethodOrConstructorRest_StartIndex); }

		}
	}
187861
@Nonnull
  public String getRest ()
  {
    final String ret = m_sInput.substring (m_nCurIndex);
    m_nCurIndex = m_nMaxIndex;
    return ret;
  }
1206843
private void doCheckpoint() throws IOException {
    long start = AvatarNode.now();
    try {
      InjectionHandler.processEvent(InjectionEvent.STANDBY_ENTER_CHECKPOINT, this.sig);
      
      // Tell the remote namenode to start logging transactions in a new edit file
      // Retuns a token that would be used to upload the merged image.
      if (!checkpointEnabled) {
        checkpointStatus("Disabled");
        // This means the Standby is not meant to checkpoint the primary
        LOG.info("Standby: Checkpointing is disabled - return");
        return;
      }
      CheckpointSignature sig = null;
      InjectionHandler.processEvent(InjectionEvent.STANDBY_BEFORE_ROLL_EDIT);
      try {
        LOG.info("Standby: Checkpointing - Roll edits logs of primary namenode "
            + nameNodeAddr);
        checkpointStatus("Edit log rolled on primary");
        synchronized(ingestStateLock) {
          sig = (CheckpointSignature) primaryNamenode.rollEditLog();
        }
      } catch (IOException ex) {
        // In this case we can return since we did not kill the Ingest thread yet
        // Nothing prevents us from doing the next checkpoint attempt
        checkpointStatus("Checkpoint failed");
        LOG.warn("Standby: Checkpointing - roll Edits on the primary node failed.");
        InjectionHandler.processEvent(
            InjectionEvent.STANDBY_EXIT_CHECKPOINT_FAILED_ROLL, ex);
        return;
      }
      
      setLastRollSignature(sig); 
      
      // consume all finalized log segments up to the required txid
      long checkpointTxId = sig.curSegmentTxId - 1;  
      LOG.info("Standby: Checkpointing - checkpoint txid: " + checkpointTxId);
      checkpointStatus("Quiescing ingest");
      quiesceIngest(checkpointTxId);
      
      if (currentSegmentTxId != checkpointTxId + 1) {
        throw new IOException(
            "Standby: Checkpointing txid mismatch - ingest consumed txns up to "
                + (currentSegmentTxId - 1) + " but should have up to "
                + checkpointTxId);
      }
      
      // if everything is fine, the edit log should be closed now
      LOG.info("Standby: Checkpointing - finished quitting ingest thread just before ckpt.");       
      assertState(StandbyIngestState.NOT_INGESTING);
  
      /**
       * From now on Ingest thread needs to know if the checkpoint was started and never finished.
       * This would mean that it doesn't have to read the edits, since they were already processed
       * to the end as a part of a checkpoint. state = StandbyIngestState.CHECKPOINTING
       */
      fsnamesys.writeLock();
      try {      
        InjectionHandler.processEvent(InjectionEvent.STANDBY_BEFORE_SAVE_NAMESPACE);
        currentIngestState = StandbyIngestState.CHECKPOINTING;
    
        // save a checkpoint of the current namespace of the local Namenode
        // We should ideally use fsnamesystem.saveNamespace but that works
        // only if namenode is not in safemode.
        LOG.info("Standby: Checkpointing - save fsimage on local namenode.");
        checkpointStatus("Saving namespace started");
        // by default checkpoints are compressed if configured
        // manual command can override this setting for one checkpoint
        fsnamesys.getFSImage().saveNamespace(false);
        // get the new signature
        sig.mostRecentCheckpointTxId = fsImage.getEditLog().getLastWrittenTxId();
        sig.imageDigest = fsImage.storage.getCheckpointImageDigest(sig.mostRecentCheckpointTxId);
      } catch (SaveNamespaceCancelledException e) {
        InjectionHandler.processEvent(InjectionEvent.STANDBY_CANCELLED_EXCEPTION_THROWN);
        LOG.info("Standby: Checkpointing - cancelled saving namespace");
        fsnamesys.getFSImage().deleteCheckpoint(checkpointTxId);
        throw e;
      } catch (IOException ex) {
        // Standby failed to save fsimage locally. Need to reinitialize
        String msg = "Standby: Checkpointing - failed to checkpoint itself, so " +
        		"no image can be uploaded to the primary. The only course of action " +
        		"is to start from the very beginning by reinitializing AvatarNode";
        LOG.error(msg, ex);
        fsnamesys.getFSImage().deleteCheckpoint(checkpointTxId);
        throw new RuntimeException(msg, ex);
      } finally {
        currentIngestState = StandbyIngestState.NOT_INGESTING;
        fsnamesys.writeUnlock();
      }
      
      // we can start the ingest again for next segment
      instantiateIngest();
      
      try {
        finalizeCheckpoint(sig);
      } catch (IOException ex) {
        LOG.error("Standby: Checkpointing - rolling the fsimage " +
            "on the Primary node failed.", ex);
        throw new FinalizeCheckpointException(ex.toString());
      }
      setCheckpointFailures(0);
      LOG.info("Standby: Checkpointing - checkpoint completed in "
          + ((AvatarNode.now() - start) / 1000) + " s.");
    } catch (IOException e) {
      LOG.error("Standby: Checkpointing - failed to complete the checkpoint: "
          + StringUtils.stringifyException(e));
      checkpointStatus("Checkpoint failed");    
      if (!checkpointEnabled) {
        // we received instruction to prepare for failover
        return;
      }
      handleCheckpointFailure();
      InjectionHandler.processEvent(InjectionEvent.STANDBY_EXIT_CHECKPOINT_EXCEPTION, e);
      throw e;
    } finally {
      countDownManualLatch(1);
      setLastRollSignature(null);
      InjectionHandler.processEvent(InjectionEvent.STANDBY_EXIT_CHECKPOINT, this.sig);
    }
  }
126612
function checkInstallerStatus(requester, searchParams) {
        var installErrorStr = searchParams.installErrorStr,
            bracketsErrorStr = searchParams.bracketsErrorStr,
            updateDirectory = searchParams.updateDir,
            encoding =        searchParams.encoding || "utf8",
            statusObj = {installError: ": BA_UN"},
            logFileAvailable = false,
            currentRequester = requester || "";

        var notifyBrackets = function notifyBrackets(errorline) {
            statusObj.installError = errorline || ": BA_UN";
            postMessageToBrackets(MessageIds.NOTIFY_INSTALLATION_STATUS, currentRequester, statusObj);
        };

        var parseLog = function (files) {
            files.forEach(function (file) {
                var fileExt = path.extname(path.basename(file));
                if (fileExt === ".logs") {
                    var fileName = path.basename(file),
                        fileFullPath = updateDirectory + '/' + file;
                    if (fileName.search("installStatus.logs") !== -1) {
                        logFileAvailable = true;
                        parseInstallerLog(fileFullPath, bracketsErrorStr, "utf8", notifyBrackets);
                    } else if (fileName.search("update.logs") !== -1) {
                        logFileAvailable = true;
                        parseInstallerLog(fileFullPath, installErrorStr, encoding, notifyBrackets);
                    }
                }
            });
            if (!logFileAvailable) {
                postMessageToBrackets(MessageIds.NOTIFY_INSTALLATION_STATUS, currentRequester, statusObj);
            }
        };

        fs.readdir(updateDirectory)
            .then(function (files) {
                return parseLog(files);
            }).catch(function () {
                postMessageToBrackets(MessageIds.NOTIFY_INSTALLATION_STATUS, currentRequester, statusObj);
            });
    }