Skip to content

Commit 3f76457

Browse files
committed
Renamed services to task
1 parent 88999ca commit 3f76457

33 files changed

+136
-221
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,18 @@ With this simple configuration, Shepherd will:
107107

108108
```json
109109
{
110-
"program1": {
111-
"initialized": 0.246384859085083,
112-
"started": 0.24660515785217285,
113-
"action_success": 5.349443197250366,
114-
"final": 5.350545883178711
110+
"my_service": {
111+
"initialized": 0.19824790954589844,
112+
"started": 0.19916582107543945,
113+
"ready": 5.461252927780151,
114+
"stopped": 60.36078095436096,
115+
"final": 60.36192083358765
115116
},
116-
"program2": {
117-
"initialized": 0.2456510066986084,
118-
"started": 5.351618051528931,
119-
"action_success": 10.464960098266602,
120-
"final": 10.465446949005127
117+
"my_action": {
118+
"initialized": 0.20003700256347656,
119+
"started": 5.466093063354492,
120+
"action_success": 10.657495021820068,
121+
"final": 10.658098936080933
121122
}
122123
}
123124
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
services:
1+
tasks:
22
program1:
33
command: "./program1.sh"
44
program2:

examples/example2/action.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
echo "Action is running..."
4+
sleep 5
5+
echo "Action completed"

examples/example2/service.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
echo "Service is starting..."
4+
sleep 5
5+
echo "Service is ready"
6+
tail -f /dev/null # Keep the service running
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
tasks:
2+
my_service:
3+
type: "service"
4+
command: "./service.sh"
5+
state:
6+
log:
7+
ready: "Service is ready"
8+
my_action:
9+
type: "action"
10+
command: "./action.sh"
11+
dependency:
12+
items:
13+
my_service: "ready"
14+
output:
15+
state_times: "state_transition_times.json"
16+
max_run_time: 60

0 commit comments

Comments
 (0)