github.com/bigcommerce/nomad@v0.9.3-bc/e2e/clientstate/restarter.nomad (about)

     1  # Restarter fakes being a flaky service that crashes and restarts constantly.
     2  # Restarting the Nomad agent during task restarts was a known cause of state
     3  # corruption in v0.8.
     4  
     5  job "restarter" {
     6    datacenters = ["dc1"]
     7    group "restarter" {
     8      restart {
     9        attempts = 100
    10        delay    = "3s"
    11      }
    12      task "restarter" {
    13        driver = "raw_exec"
    14        config {
    15          command = "/bin/bash"
    16          args    = ["-c", "echo $$ >> pid && sleep 1 && exit 99"]
    17        }
    18      }
    19    }
    20  }