* CanStartTask determines whether a task is ready to be started because * it has pending runs and we are running less than MaxRunningTasks. */
| 980 | * it has pending runs and we are running less than MaxRunningTasks. |
| 981 | */ |
| 982 | static bool |
| 983 | CanStartTask(CronTask *task) |
| 984 | { |
| 985 | return task->state == CRON_TASK_WAITING && task->pendingRunCount > 0 && |
| 986 | RunningTaskCount < max_running_tasks; |
| 987 | } |
| 988 | |
| 989 | /* |
| 990 | * ManageCronTasks proceeds the state machines of the given list of tasks. |
no outgoing calls
no test coverage detected