// IsRunning returns the running state of the container.
426040
func (c *Container) IsRunning(ctx context.Context) bool {
	return c.container.State.Running
}
658884
func (s *Stopwatch) IsRunning() bool {
	s.RLock()
	defer s.RUnlock()

	return s.isRunning()
}
792750
func (p *Pod) IsAfterRun() bool {
	return p.isExitedDeleting || p.isDeleting || p.isExited || p.isGarbage
}
484802
func (m *CPUMiner) IsMining() bool {
	m.Lock()
	defer m.Unlock()

	return m.started
}
854806
func (c *containerDClient) IsRunning(ep *endpoint.Endpoint) bool {
	return c.cri.IsRunning(ep)
}
227662
func (kl *Kubelet) isPodRunning(pod *v1.Pod, status *kubecontainer.PodStatus) bool {
	for _, c := range pod.Spec.Containers {
		cs := status.FindContainerStatusByName(c.Name)
		if cs == nil || cs.State != kubecontainer.ContainerStateRunning {
			klog.Infof("Container %q for pod %q not running", c.Name, format.Pod(pod))
			return false
		}
	}
	return true
}
1301164
func (v *ProcTableImpl) MarkRunning(pvName string) error {
	v.mutex.Lock()
	defer v.mutex.Unlock()
	_, ok := v.procTable[pvName]
	if ok {
		return fmt.Errorf("Failed to mark running of %q as it is already running, should never happen", pvName)
	}
	v.procTable[pvName] = ProcEntry{StartTime: time.Now(), Status: CSRunning}
	return nil
}
921423
func (podStatus *PodStatus) GetRunningContainerStatuses() []*ContainerStatus {
	runningContainerStatuses := []*ContainerStatus{}
	for _, containerStatus := range podStatus.ContainerStatuses {
		if containerStatus.State == ContainerStateRunning {
			runningContainerStatuses = append(runningContainerStatuses, containerStatus)
		}
	}
	return runningContainerStatuses
}
1047815
func (p *StatusTable) IsRunning(name string) bool {
	p.RLock()
	defer p.RUnlock()

	return p.pool[name]
}
101190
func (s *Service) SetRunningCount(v int64) *Service {
	s.RunningCount = &v
	return s
}
1125674
func (mr *MockAgentServiceMockRecorder) Running() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Running", reflect.TypeOf((*MockAgentService)(nil).Running))
}
1019478
func notRunning(statuses []v1.ContainerStatus) bool {
	for _, status := range statuses {
		if status.State.Terminated == nil && status.State.Waiting == nil {
			return false
		}
	}
	return true
}
411200
func (c *criClient) IsRunning(ep *endpoint.Endpoint) bool {
	if c == nil {
		return false
	}

	podID := ep.GetContainerID()

	if podID == "" {
		return false
	}

	pssr := criRuntime.PodSandboxStatusRequest{
		PodSandboxId: podID,
	}
	ns := namespaces.WithNamespace(context.Background(), k8sContainerdNamespace)
	cont, err := c.RuntimeServiceClient.PodSandboxStatus(ns, &pssr)
	if err == criStore.ErrNotExist {
		return false
	}
	if err != nil {
		log.WithError(err).Debugf("unable to get pod sandbox status of %v", pssr)
		return false
	}

	return cont.GetStatus().State == criRuntime.PodSandboxState_SANDBOX_READY
}
196160
func IsStaring(userID, repoID int64) bool {
	has, _ := x.Get(&Star{0, userID, repoID})
	return has
}
24641
func hasRunningPod(pods []corev1.Pod) bool {
	for _, pod := range pods {
		switch pod.Status.Phase {
		case corev1.PodFailed, corev1.PodSucceeded:
			// Don't count pods in terminal state.
			continue
		case corev1.PodUnknown:
			// This happens in situation like when the node is temporarily disconnected from the cluster.
			// If we can't be sure that the pod is not running, we have to count it.
			return true
		default:
			// Pod is not in terminal phase.
			return true
		}
	}

	return false
}
527976
func (c *Connection) Running() time.Duration {
	return time.Since(c.mets.st)
}
822038
func checkRunning() bool {
	var zone string
	var err error

	if connection != nil {
		err = connection.sysobj.Call(dbusInterface+".getDefaultZone", 0).Store(&zone)
		return err == nil
	}
	return false
}