Beispiel #1
0
        internal void AttachCore(BuildStartData buildStartData, string masterName)
        {
            Logger.Log.DistributionAttachReceived(m_appLoggingContext, buildStartData.SessionId, masterName);
            BuildStartData = buildStartData;

            // The app-level logging context has a wrong session id. Fix it now that we know the right one.
            m_appLoggingContext = new LoggingContext(
                m_appLoggingContext.ActivityId,
                m_appLoggingContext.LoggerComponentInfo,
                new LoggingContext.SessionInfo(buildStartData.SessionId, m_appLoggingContext.Session.Environment, m_appLoggingContext.Session.RelatedActivityId),
                m_appLoggingContext);


            if (m_isGrpcEnabled)
            {
                m_masterClient = new Grpc.GrpcMasterClient(m_appLoggingContext, m_services.BuildId, buildStartData.MasterLocation.IpAddress, buildStartData.MasterLocation.Port, OnConnectionTimeOutAsync);
            }
            else
            {
#if !DISABLE_FEATURE_BOND_RPC
                m_bondWorkerService.UpdateLoggingContext(m_appLoggingContext);
                m_bondMasterClient = new InternalBond.BondMasterClient(m_appLoggingContext, buildStartData.MasterLocation.IpAddress, buildStartData.MasterLocation.Port);
                m_masterClient     = m_bondMasterClient;
#endif
            }

            WorkerId = BuildStartData.WorkerId;

            m_attachCompletionSource.TrySetResult(true);
        }
Beispiel #2
0
        internal void Start(IMasterClient masterClient)
        {
            Contract.AssertNotNull(masterClient);

            m_masterClient       = masterClient;
            m_executionLogTarget = new NotifyMasterExecutionLogTarget(this, m_environment.Context, m_scheduler.PipGraph.GraphId, m_scheduler.PipGraph.MaxAbsolutePathIndex);
            m_scheduler.AddExecutionLogTarget(m_executionLogTarget);
            m_sendThread.Start();
        }
Beispiel #3
0
        internal void AttachCore(BuildStartData buildStartData, string masterName)
        {
            Logger.Log.DistributionAttachReceived(m_appLoggingContext, buildStartData.SessionId, masterName);
            BuildStartData = buildStartData;

            // The app-level logging context has a wrong session id. Fix it now that we know the right one.
            m_appLoggingContext = new LoggingContext(
                m_appLoggingContext.ActivityId,
                m_appLoggingContext.LoggerComponentInfo,
                new LoggingContext.SessionInfo(buildStartData.SessionId, m_appLoggingContext.Session.Environment, m_appLoggingContext.Session.RelatedActivityId),
                m_appLoggingContext);

            m_masterClient = new Grpc.GrpcMasterClient(m_appLoggingContext, m_services.BuildId, buildStartData.MasterLocation.IpAddress, buildStartData.MasterLocation.Port, OnConnectionTimeOutAsync);

            WorkerId = BuildStartData.WorkerId;

            m_attachCompletionSource.TrySetResult(true);
        }
Beispiel #4
0
 public NotifyStream(uint workerId, IMasterClient masterClient, DistributionServices services)
 {
     m_workerId     = workerId;
     m_masterClient = masterClient;
     m_services     = services;
 }
Beispiel #5
0
 internal NotifyMasterExecutionLogTarget(uint workerId, IMasterClient masterClient, PipExecutionContext context, Guid logId, int lastStaticAbsolutePathIndex, DistributionServices services)
     : this(new NotifyStream(workerId, masterClient, services), context, logId, lastStaticAbsolutePathIndex)
 {
 }