// Critical apps cannot be completely scaled down by the scheduler
510899
func (a *App) Critical() bool {
	v, ok := a.Meta["flynn-system-critical"]
	return ok && v == "true"
}
391456
func newScheduler(db *empire.DB, c *Context) (empire.Scheduler, error) {
	var (
		s   empire.Scheduler
		err error
	)

	switch c.String(FlagScheduler) {
	case "cloudformation":
		s, err = newCloudFormationScheduler(db, c)
	default:
		return nil, fmt.Errorf("unknown scheduler: %s", c.String(FlagScheduler))
	}

	if err != nil {
		return nil, fmt.Errorf("failed to initialize %s scheduler: %v", c.String(FlagScheduler), err)
	}

	// If ECS tasks support being attached to with a TTY + stdin, let the
	// CloudFormation backend run attached processes.
	if c.Bool(FlagECSAttachedEnabled) {
		return s, nil
	}

	d, err := newDockerClient(c)
	if err != nil {
		return nil, err
	}

	a := docker.RunAttachedWithDocker(s, d)
	a.ShowAttached = c.Bool(FlagXShowAttached)
	return a, nil
}
1052514
func (dl *DefaultLogger) Critical(message string, params ...interface{}) {
	dl.logger.Criticalf(message, params...)
}
597786
func (_m *FacadeInterface) ScheduleServices(ctx datastore.Context, serviceIDs []string, autoLaunch bool, synchronous bool, desiredState service.DesiredState, emergency bool) (int, error) {
	ret := _m.Called(ctx, serviceIDs, autoLaunch, synchronous, desiredState, emergency)

	var r0 int
	if rf, ok := ret.Get(0).(func(datastore.Context, []string, bool, bool, service.DesiredState, bool) int); ok {
		r0 = rf(ctx, serviceIDs, autoLaunch, synchronous, desiredState, emergency)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(datastore.Context, []string, bool, bool, service.DesiredState, bool) error); ok {
		r1 = rf(ctx, serviceIDs, autoLaunch, synchronous, desiredState, emergency)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
553191
func (l *Logger) Criticalf(format string, v ...interface{}) {
	l.Fprint(l.flags, LEVEL_CRITICAL, 2, fmt.Sprintf(format, v...), nil)
}
995669
func (l *Logger) Criticalln(v ...interface{}) {
	l.Fprint(l.flags, LEVEL_CRITICAL, 2, fmt.Sprintln(v...), nil)
}
630825
func NewScheduler(db *gorm.DB) *Scheduler {
	s := Scheduler{db: db}
	return &s
}
116355
func (l *Logger) Critical(format string, a ...interface{}) {
	l.Log(LevelCritical, format, a...)
}
658616
func (writer *SocketWriter) Critical(args ...interface{}) {
	if nil == writer.writer || CRITICAL < writer.level {
		return
	}

	writer.write(CRITICAL, args...)
}
1023623
func (e *Empire) Apps(q AppsQuery) ([]*App, error) {
	return apps(e.db, q)
}
412645
func (l *Logger) Critical(msg string, fields map[string]interface{}) error {
	return l.Log(LvCritical, msg, fields)
}
1265891
func Convert_scheduling_PriorityClass_To_v1beta1_PriorityClass(in *scheduling.PriorityClass, out *v1beta1.PriorityClass, s conversion.Scope) error {
	return autoConvert_scheduling_PriorityClass_To_v1beta1_PriorityClass(in, out, s)
}
854286
func (c *Client) GetAllScheduledMaintenances() (ScheduledMaintenancesResponse, error) {
	s := ScheduledMaintenancesResponse{}
	err := c.request("api/v2/scheduled-maintenances.json", &s)
	return s, err
}
721166
func (dl *ConsoleLogger) Critical(message interface{}, params ...interface{}) {
	dl.logger.Criticalf(fmt.Sprintf("%s %s", caller(), fmt.Sprint(message)), params...)
}
341057
func (s *appsService) Destroy(ctx context.Context, db *gorm.DB, app *App) error {
	if err := appsDestroy(db, app); err != nil {
		return err
	}

	return s.Scheduler.Remove(ctx, app.ID)
}
1340127
func (m *MockInterface) Scheduling() v1beta110.SchedulingV1beta1Interface {
	ret := m.ctrl.Call(m, "Scheduling")
	ret0, _ := ret[0].(v1beta110.SchedulingV1beta1Interface)
	return ret0
}
20199
func (c *Client) ListAppEvents(eventType string) ([]AppEventEntity, error) {
	return c.ListAppEventsByQuery(eventType, nil)
}