Skip to content

Commit 2f31243

Browse files
committed
Update docs
1 parent 07d2585 commit 2f31243

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

docs-src/server.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ namespace MyWebApp
3636

3737
protected void Application_Start()
3838
{
39-
ServerHost = new ServerHost();
40-
ServerHost.Start();
39+
var settings = InEngineSettings.Make();
40+
ServerHost = new ServerHost() {
41+
MailSettings = settings.Mail,
42+
QueueSettings = settings.Queue,
43+
};
4144
}
4245

4346
protected void Application_End()

docs/search/search_index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
},
283283
{
284284
"location": "/server/",
285-
"text": "Server\n\n\nWhen run as a service, InEngine runs scheduled commands in the background and actively listens for commands to be queued.\n\n\nRunning the Server\n\n\nThe server can be run in a variety of ways.\n\n\nIn the Foreground\n\n\nRunning the server from the CommandLine is useful for debugging or local development:\n\n\ninengine.exe -s\n\n\n\n\n\nIt can also be run on Mac and Linux with Mono via a shell wrapper script:\n\n\n./inengine -s\n\n\n\n\n\nIn ASP.NET\n\n\nThe server can be run in Global.asax.cs:\n\n\nusing\n \nSystem.Web\n;\n\n\nusing\n \nInEngine.Core\n;\n\n\n\nnamespace\n \nMyWebApp\n\n\n{\n\n \npublic\n \nclass\n \nGlobal\n \n:\n \nHttpApplication\n\n \n{\n\n \npublic\n \nServerHost\n \nServerHost\n \n{\n \nget\n;\n \nset\n;\n \n}\n\n\n \nprotected\n \nvoid\n \nApplication_Start\n()\n\n \n{\n\n \nServerHost\n \n=\n \nnew\n \nServerHost\n();\n\n \nServerHost\n.\nStart\n();\n\n \n}\n\n\n \nprotected\n \nvoid\n \nApplication_End\n()\n\n \n{\n\n \nServerHost\n.\nDispose\n();\n\n \n}\n\n \n}\n\n\n}\n\n\n\n\n\n\nOn Windows as a Service\n\n\nRun the \nInstall.ps1\n PowerShell script in the InEngine directory to install the InEngine as a service. \nThe script needs to be run as an administrator. \nThe script will register the service at the location where the script is run - i.e. put the files where you want them installed before running the installation script.\n\n\nps Install.ps1\n\n\n\n\n\nSimply run the \nUninstall.ps1\n script with elevated permissions to remove the service.\n\n\nps Uninstall.ps1\n\n\n\n\n\nOn Linux with Supervisor\n\n\nSupervisor is a process control system for Linux. \nIt has extensive \ndocumentation\n, but the following should be enough to get started.\n\n\nInstalling Supervisor\n\n\nThis command installs Supervisor on Ubuntu:\n\n\nsudo apt-get install supervisor\n\n\n\n\n\nConfiguring Supervisor\n\n\nSupervisor configuration files are stored in the \n/etc/supervisor/conf.d\n directory. Multiple files can be created in this directory to specify different programs, or multiple instances of the same program, for Supervisor to monitor. Copy this sample config into a file called \n/etc/supervisor/conf.d/inengine-scheduler.conf\n. \n\n\n[program:inengine]\n\n\nprocess_name\n=\n%(program_name)s_%(process_num)02d\n\n\ndirectory\n=\n/path/to/inengine\n\n\ncommand\n=\nmono inengine.exe -s\n\n\nautostart\n=\ntrue\n\n\nautorestart\n=\ntrue\n\n\nuser\n=\nInEngine\n\n\nnumprocs\n=\n1\n\n\nredirect_stderr\n=\ntrue\n\n\nstdout_logfile\n=\n./inengine.log\n\n\n\n\n\n\nStarting Supervisor\n\n\nWhenever a configuration change happens to files in the Supervisor config files, Supervisor needs to be instructed to reload its configuration.\n\n\nsudo supervisorctl reread\nsudo supervisorctl update\n\n\n\n\n\nNow, simply start the server workers with the \nsupervisorctl\n program:\n\n\nsudo supervisorctl start inengine:*\n\n\n\n\n\nIn a Container with Docker\n\n\nInstall \nDocker\n first, then pull the \nethanhann/inengine\n image:\n\n\ndocker pull ethanhann/inengine:latest\n\n\n\n\n\nNow run the InEngine in server mode:\n\n\ndocker run --rm ethanhann/inengine -s",
285+
"text": "Server\n\n\nWhen run as a service, InEngine runs scheduled commands in the background and actively listens for commands to be queued.\n\n\nRunning the Server\n\n\nThe server can be run in a variety of ways.\n\n\nIn the Foreground\n\n\nRunning the server from the CommandLine is useful for debugging or local development:\n\n\ninengine.exe -s\n\n\n\n\n\nIt can also be run on Mac and Linux with Mono via a shell wrapper script:\n\n\n./inengine -s\n\n\n\n\n\nIn ASP.NET\n\n\nThe server can be run in Global.asax.cs:\n\n\nusing\n \nSystem.Web\n;\n\n\nusing\n \nInEngine.Core\n;\n\n\n\nnamespace\n \nMyWebApp\n\n\n{\n\n \npublic\n \nclass\n \nGlobal\n \n:\n \nHttpApplication\n\n \n{\n\n \npublic\n \nServerHost\n \nServerHost\n \n{\n \nget\n;\n \nset\n;\n \n}\n\n\n \nprotected\n \nvoid\n \nApplication_Start\n()\n\n \n{\n\n \nvar\n \nsettings\n \n=\n \nInEngineSettings\n.\nMake\n();\n\n \nServerHost\n \n=\n \nnew\n \nServerHost\n()\n \n{\n\n \nMailSettings\n \n=\n \nsettings\n.\nMail\n,\n\n \nQueueSettings\n \n=\n \nsettings\n.\nQueue\n,\n\n \n};\n\n \n}\n\n\n \nprotected\n \nvoid\n \nApplication_End\n()\n\n \n{\n\n \nServerHost\n.\nDispose\n();\n\n \n}\n\n \n}\n\n\n}\n\n\n\n\n\n\nOn Windows as a Service\n\n\nRun the \nInstall.ps1\n PowerShell script in the InEngine directory to install the InEngine as a service. \nThe script needs to be run as an administrator. \nThe script will register the service at the location where the script is run - i.e. put the files where you want them installed before running the installation script.\n\n\nps Install.ps1\n\n\n\n\n\nSimply run the \nUninstall.ps1\n script with elevated permissions to remove the service.\n\n\nps Uninstall.ps1\n\n\n\n\n\nOn Linux with Supervisor\n\n\nSupervisor is a process control system for Linux. \nIt has extensive \ndocumentation\n, but the following should be enough to get started.\n\n\nInstalling Supervisor\n\n\nThis command installs Supervisor on Ubuntu:\n\n\nsudo apt-get install supervisor\n\n\n\n\n\nConfiguring Supervisor\n\n\nSupervisor configuration files are stored in the \n/etc/supervisor/conf.d\n directory. Multiple files can be created in this directory to specify different programs, or multiple instances of the same program, for Supervisor to monitor. Copy this sample config into a file called \n/etc/supervisor/conf.d/inengine-scheduler.conf\n. \n\n\n[program:inengine]\n\n\nprocess_name\n=\n%(program_name)s_%(process_num)02d\n\n\ndirectory\n=\n/path/to/inengine\n\n\ncommand\n=\nmono inengine.exe -s\n\n\nautostart\n=\ntrue\n\n\nautorestart\n=\ntrue\n\n\nuser\n=\nInEngine\n\n\nnumprocs\n=\n1\n\n\nredirect_stderr\n=\ntrue\n\n\nstdout_logfile\n=\n./inengine.log\n\n\n\n\n\n\nStarting Supervisor\n\n\nWhenever a configuration change happens to files in the Supervisor config files, Supervisor needs to be instructed to reload its configuration.\n\n\nsudo supervisorctl reread\nsudo supervisorctl update\n\n\n\n\n\nNow, simply start the server workers with the \nsupervisorctl\n program:\n\n\nsudo supervisorctl start inengine:*\n\n\n\n\n\nIn a Container with Docker\n\n\nInstall \nDocker\n first, then pull the \nethanhann/inengine\n image:\n\n\ndocker pull ethanhann/inengine:latest\n\n\n\n\n\nNow run the InEngine in server mode:\n\n\ndocker run --rm ethanhann/inengine -s",
286286
"title": "Server"
287287
},
288288
{
@@ -302,7 +302,7 @@
302302
},
303303
{
304304
"location": "/server/#in-aspnet",
305-
"text": "The server can be run in Global.asax.cs: using System.Web ; using InEngine.Core ; namespace MyWebApp { \n public class Global : HttpApplication \n { \n public ServerHost ServerHost { get ; set ; } \n\n protected void Application_Start () \n { \n ServerHost = new ServerHost (); \n ServerHost . Start (); \n } \n\n protected void Application_End () \n { \n ServerHost . Dispose (); \n } \n } }",
305+
"text": "The server can be run in Global.asax.cs: using System.Web ; using InEngine.Core ; namespace MyWebApp { \n public class Global : HttpApplication \n { \n public ServerHost ServerHost { get ; set ; } \n\n protected void Application_Start () \n { \n var settings = InEngineSettings . Make (); \n ServerHost = new ServerHost () { \n MailSettings = settings . Mail , \n QueueSettings = settings . Queue , \n }; \n } \n\n protected void Application_End () \n { \n ServerHost . Dispose (); \n } \n } }",
306306
"title": "In ASP.NET"
307307
},
308308
{

docs/server/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,11 @@ <h3 id="in-aspnet">In ASP.NET<a class="headerlink" href="#in-aspnet" title="Perm
621621

622622
<span class="k">protected</span> <span class="k">void</span> <span class="nf">Application_Start</span><span class="p">()</span>
623623
<span class="p">{</span>
624-
<span class="n">ServerHost</span> <span class="p">=</span> <span class="k">new</span> <span class="n">ServerHost</span><span class="p">();</span>
625-
<span class="n">ServerHost</span><span class="p">.</span><span class="n">Start</span><span class="p">();</span>
624+
<span class="kt">var</span> <span class="n">settings</span> <span class="p">=</span> <span class="n">InEngineSettings</span><span class="p">.</span><span class="n">Make</span><span class="p">();</span>
625+
<span class="n">ServerHost</span> <span class="p">=</span> <span class="k">new</span> <span class="n">ServerHost</span><span class="p">()</span> <span class="p">{</span>
626+
<span class="n">MailSettings</span> <span class="p">=</span> <span class="n">settings</span><span class="p">.</span><span class="n">Mail</span><span class="p">,</span>
627+
<span class="n">QueueSettings</span> <span class="p">=</span> <span class="n">settings</span><span class="p">.</span><span class="n">Queue</span><span class="p">,</span>
628+
<span class="p">};</span>
626629
<span class="p">}</span>
627630

628631
<span class="k">protected</span> <span class="k">void</span> <span class="nf">Application_End</span><span class="p">()</span>

docs/sitemap.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
<url>
77
<loc>/</loc>
8-
<lastmod>2017-12-15</lastmod>
8+
<lastmod>2017-12-16</lastmod>
99
<changefreq>daily</changefreq>
1010
</url>
1111

1212
<url>
1313
<loc>/license/</loc>
14-
<lastmod>2017-12-15</lastmod>
14+
<lastmod>2017-12-16</lastmod>
1515
<changefreq>daily</changefreq>
1616
</url>
1717

@@ -21,31 +21,31 @@
2121

2222
<url>
2323
<loc>/commands/</loc>
24-
<lastmod>2017-12-15</lastmod>
24+
<lastmod>2017-12-16</lastmod>
2525
<changefreq>daily</changefreq>
2626
</url>
2727

2828
<url>
2929
<loc>/scheduling/</loc>
30-
<lastmod>2017-12-15</lastmod>
30+
<lastmod>2017-12-16</lastmod>
3131
<changefreq>daily</changefreq>
3232
</url>
3333

3434
<url>
3535
<loc>/queuing/</loc>
36-
<lastmod>2017-12-15</lastmod>
36+
<lastmod>2017-12-16</lastmod>
3737
<changefreq>daily</changefreq>
3838
</url>
3939

4040
<url>
4141
<loc>/configuration/</loc>
42-
<lastmod>2017-12-15</lastmod>
42+
<lastmod>2017-12-16</lastmod>
4343
<changefreq>daily</changefreq>
4444
</url>
4545

4646
<url>
4747
<loc>/server/</loc>
48-
<lastmod>2017-12-15</lastmod>
48+
<lastmod>2017-12-16</lastmod>
4949
<changefreq>daily</changefreq>
5050
</url>
5151

0 commit comments

Comments
 (0)