Last change
on this file since 4316 was
4267,
checked in by cneumuel, 14 years ago
|
renamed all database entities from "Client" to "Slave" (#1157)
made slave-heartbeats synchronous, also they send HBs when timetable disallows them to calculate. they will appear on the server as Idle bis IsAllowedToCalculate will be false (#1159)
|
File size:
848 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.PluginInfrastructure;
|
---|
6 | using HeuristicLab.Hive.Server;
|
---|
7 | using HeuristicLab.Hive.Server.DataAccess;
|
---|
8 | using System.Windows.Forms;
|
---|
9 |
|
---|
10 | namespace HeuristicLab.Hive.Server.Core {
|
---|
11 | [Application("Create Hive Database", "Creates new empty Hive Database.", true)]
|
---|
12 | class CreateHiveDatabaseApplication : ApplicationBase {
|
---|
13 |
|
---|
14 | public override void Run() {
|
---|
15 | IContextFactory contextFactory = ServiceLocator.GetContextFactory();
|
---|
16 | using (contextFactory.GetContext(false)) {
|
---|
17 | if (contextFactory.CurrentContext.DatabaseExists())
|
---|
18 | contextFactory.CurrentContext.DeleteDatabase();
|
---|
19 | contextFactory.CurrentContext.CreateDatabase();
|
---|
20 | MessageBox.Show("Creating Database finished.");
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
24 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.