Skip to content

Commit b3476a1

Browse files
committed
Update docs
1 parent 5ecb474 commit b3476a1

File tree

3 files changed

+63
-12
lines changed

3 files changed

+63
-12
lines changed

docs-src/commands.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,29 @@ public override void Run()
147147
}
148148
```
149149

150-
### Executing Arbitrary Processes
150+
### Running non-.NET Commands
151151

152152
It isn't necessary to create C# classes to utilize InEngine.NET.
153-
Arbitrary commands can be run, with an argument list by leveraging the InEngine.Core plugin's **proc** command.
154-
The command lists directory contents using "ls" with the "-lhp" switches:
153+
Arbitrary commands can be run, with an argument list by leveraging the InEngine.Core plugin's **exec** command.
154+
155+
This command prints the version of python:
155156

156157
```bash
157-
inengine.exe proc -c"/bin/ls" -a"-lhp"
158+
inengine.exe exec -e"python" -a"--version"
159+
```
160+
161+
Whitelist the "php" command in the [appsettings.json](configuration) file:
162+
163+
```json
164+
{
165+
"InEngine": {
166+
// ...
167+
"ExecWhitelist": {
168+
"ls": "ls"
169+
}
170+
// ...
171+
}
172+
}
158173
```
159174

160175
## View Commands
@@ -174,7 +189,9 @@ inengine.exe
174189

175190
## View a Command's Help Text
176191

177-
Run the command with the -h or --help arguments.
192+
Run the command with the -h or --help arguments to see help text.
193+
194+
This command prints the publish command's help text, from the core plugin:
178195

179196
```bash
180197
inengine.exe queue:publish -h

docs-src/index.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It also has a built-in command for launching external non-.NET programs.
77

88
Get started by pulling the binaries from the [latest release](https://github.com/InEngine-NET/InEngine.NET/releases) on GitHub.
99

10-
Then run a command the **echo** command from the core plugin:
10+
Then run the **echo** command from the core plugin:
1111

1212
```bash
1313
inengine.exe echo --text"Hello, world"
@@ -32,8 +32,6 @@ docker run --rm inengine echo --text"Hello, world"
3232

3333
## How does queueing work?
3434

35-
There are a lot of [queuing](queuing) features, but this is the gist...
36-
3735
Want to queue our example echo command to run in the background or possibly on another server?
3836

3937
Use the core plugin's **queue:publish** command:
@@ -44,24 +42,47 @@ inengine.exe queue:publish --command-plugin=InEngine.Core --command-verb=echo --
4442

4543
How do we consume that queued echo command?
4644

47-
Use the core plugin's **queue:consume** command of course:
45+
Use the core plugin's **queue:consume** command:
4846

4947
```bash
5048
inengine.exe queue:consume
5149
```
5250

5351
## How do I run non-.NET commands?
5452

55-
There is a special **proc** command in the core plugin that allows for the execution of any program you can run at the command line.
53+
There is a special **exec** command in the core plugin that allows for the execution of any program you can run at the command line.
5654

5755
For example, create a python script called **helloworld.py** that contains this:
5856

5957
```python
6058
print 'Hello, world!'
6159
```
6260

63-
Now execute it with the **proc** command:
61+
Whitelist the "python" command in the [appsettings.json](configuration) file:
62+
63+
```json
64+
{
65+
"InEngine": {
66+
// ...
67+
"ExecWhitelist": {
68+
"python": "/usr/bin/python"
69+
}
70+
// ...
71+
}
72+
}
73+
```
74+
75+
Now execute it with the **exec** command:
76+
77+
```bash
78+
inengine exe --command=python --args=helloworld.py
79+
```
80+
81+
Why would you want to do this?
82+
It opens up the possibility of running shell scripts, ETLs, Java programs, etc. in the background or on a schedule.
83+
84+
The example python script can be queued:
6485

6586
```bash
66-
inengine proc --command=/usr/bin/python --args=helloworld.py
87+
inengine queue:publish --command-plugin=InEngine.Core --command-verb=exec --args="executable=python" "args=helloworld.py"
6788
```

docs-src/queuing.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ Enqueue.Command(() => Console.WriteLine("Hello, world!"))
9393
.Dispatch();
9494
```
9595

96+
### With the "exec" Command
97+
98+
The **exec** command allows for external programs to be executed.
99+
100+
```bash
101+
inengine queue:publish --command-plugin=InEngine.Core --command-verb=exe --args="command=/usr/bin/python" "args=--version"
102+
```
103+
104+
!!! note "Do not include "--" for the command and args parameters."
105+
This is purely to make parsing easier internally.
106+
107+
108+
96109
### Sequentially In a Chain
97110

98111
Chained commands run in the order specified.

0 commit comments

Comments
 (0)