Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
avoid nomad token issues
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Sep 16, 2021
1 parent c2042e6 commit 5278ef2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bitte_ci/listener.cr
Expand Up @@ -74,6 +74,7 @@ module BitteCI
nomad_url = config.nomad_base_url.dup
nomad_url.path = "/v1/event/stream"
nomad_url.query = URI::Params.new({
"topic" => ["Job", "Allocation", "Deployment", "Evaluation"],
"index" => [(index + 1).to_s],
}).to_s

Expand All @@ -99,6 +100,7 @@ module BitteCI
end

def handle_line(db, line)
raise "Possibly invalid Nomad token" if line == "Permission denied"
return if line == "{}"
return unless line.starts_with?("{")

Expand Down

0 comments on commit 5278ef2

Please sign in to comment.