Manage runs, schedules and results on a server

Usage: barca serve [OPTIONS] [FILES]...

Arguments:
  [FILES]...
          Python files or directories; default: discover the project

Options:
      --auth <AUTH>
          Require project bearer tokens; overrides BARCA_SERVER_AUTH and [server] auth

  -p, --port <PORT>
          Port to bind on

          [default: 8274]

      --host <HOST>
          Bind address; 0.0.0.0 exposes the unauthenticated API

          [default: 127.0.0.1]

      --watch
          Reload changed source files; restart to discover new files

      --no-schedule
          Disable scheduled runs

      --timezone <TIMEZONE>
          Cron timezone: local, utc or an IANA name such as America/New_York

          [default: local]

      --read-only
          Inspect only: refuse runs, never schedule, read compatible WAL metadata in place

      --drain-timeout <SECONDS>
          Shutdown grace period in seconds; unfinished runs requeue (default: config or 30)

      --max-runs <N>
          Maximum concurrent runs; others queue (default: config or CPU count)

      --capacity <N>
          Limit total running step weight across server runs (experimental)

      --run-timeout <SECONDS>
          Run time limit in seconds; 0 disables it (default: config or unlimited)

      --env <ENV>
          Use a separate cache and history for this environment

  -h, --help
          Show concise command help

      --examples
          Show all command examples without running anything

Examples:
  BARCA_REMOTE=off barca serve pipeline.py   # local artifacts and history
  BARCA_LOG=json barca serve pipeline.py     # each line a JSON object on stdout, with run_id and node
  BARCA_TELEMETRY=datadog barca serve pipeline.py   # a trace per run; barca.serve.up via DogStatsD
  barca serve                                # every file in the project; files added later need a restart
  barca serve pipeline.py                    # HTTP API on 127.0.0.1:8274 plus the scheduler
  barca serve pipeline.py --port 8400        # custom port
  barca serve pipeline.py --host 0.0.0.0     # all interfaces (containers, VMs); the API has no auth
  barca serve pipeline.py --watch            # dev: re-parse the DAG when files change
  barca serve pipeline.py --no-schedule      # API only; Schedule(...) nodes do not fire
  barca serve pipeline.py --timezone utc     # evaluate cron in UTC (default: local)
  barca serve pipeline.py --timezone America/New_York   # an IANA zone name
  barca serve pipeline.py --read-only        # inspect only: no runs, no scheduler, DB never written
  barca serve pipeline.py --drain-timeout 120   # on SIGTERM, give runs in flight 2 minutes
  barca serve pipeline.py --max-runs 2       # at most 2 runs at once; the others wait in the queue
  barca serve pipeline.py --capacity 4       # the weight= of every run's running steps adds up to at most 4
  barca serve pipeline.py --run-timeout 3600 # stop a run that takes longer than an hour
  barca serve pipeline.py --run-timeout 0    # no run timeout (the default)
  barca serve pipeline.py --env prod         # .barca/envs/prod/metadata.db, named on the startup line

More: barca docs scheduling
