2019-01-26 00:51:20 +00:00
|
|
|
# Sleeper is a fake service that outputs its pid to a file named `pid` to
|
|
|
|
# assert duplicate tasks are never started.
|
|
|
|
|
|
|
|
job "sleeper" {
|
|
|
|
datacenters = ["dc1"]
|
2019-10-11 12:00:05 +00:00
|
|
|
|
2019-11-25 18:31:00 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
2019-01-26 00:51:20 +00:00
|
|
|
task "sleeper" {
|
|
|
|
driver = "raw_exec"
|
2019-10-11 12:00:05 +00:00
|
|
|
|
2019-01-26 00:51:20 +00:00
|
|
|
config {
|
|
|
|
command = "/bin/bash"
|
|
|
|
args = ["-c", "echo $$ >> pid && sleep 999999"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|