kittoframework / kitto

Kitto is a framework for interactive dashboards written in Elixir
http://kitto.io/dashboards/sample
MIT License
956 stars 58 forks source link

Jobs with string names fail #98

Closed davejlong closed 7 years ago

davejlong commented 7 years ago

Environment

Built with: Elixir 1.3.4 and OTP 18.3.4.4

* Node / NPM version (node -v) (npm -v):

node -v; and npm -v v7.7.1 4.1.2

* Operating system:

uname -a Darwin Compe.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64


### Current behavior

If naming a job with a string, the job runner will crash. Example:

job "my_test_job", {5, :minutes} do
  text = ["Hello World!", "Hi Kitto!", "Elixir is the best!"] |> Enum.random()

  broadcast! text
end

Expected behavior

The job should fail when compiling (instead of at runtime) or automatically convert the name of the job to an atom.

davejlong commented 7 years ago

When I say "fail when compiling", what I really mean is it should fail validation from the workspace.