1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-27 10:50:10 +03:00

Merge branch 'feature-1843-bis'

This commit is contained in:
Ruben S. Montero 2018-03-22 18:16:45 +01:00
commit 9397a80f95
3 changed files with 11 additions and 6 deletions

View File

@ -42,15 +42,20 @@ class SchedulerTemplate;
class Scheduler: public ActionListener
{
public:
void start();
virtual void register_policies(const SchedulerTemplate& conf){};
static Scheduler& instance()
static Scheduler& instance(Scheduler* the_sched=0)
{
static Scheduler _sched;
return _sched;
static Scheduler * sched = 0;
if ( the_sched != 0)
{
sched = the_sched;
}
return *sched;
}
float get_mem_ds_scale()

View File

@ -37,7 +37,6 @@
using namespace std;
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */

View File

@ -15,6 +15,7 @@
/* -------------------------------------------------------------------------- */
#include "RankScheduler.h"
#include "Scheduler.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -25,7 +26,7 @@
int main(int argc, char **argv)
{
Scheduler& sched = RankScheduler::instance();
Scheduler& sched = Scheduler::instance(new RankScheduler());
try
{