Help with GenStage demo app from Elixir London June 2016 w/ José Valim

José was kind enough to share with me his demo app on GenStage from the presentation above. I have uploaded it to github though I am unable to get it working. My first point of failure is Process.send(@name, :enqueued). I am getting an error indicating:

function Process.send/2 is undefined or private. Did you mean one of:
* send/3

If I replace that with send(@name, :enqueued) no errors are shown but Delayed.Job.take is not called.

What am I missing?

Hey Chu, I was able to get it working. First, I had to alias Experimental.GenStage to get it started (plus the db setup).

There are two issues in the Delayed.Producer module. There is no Process.send/2 but there is a Kernel.send/2 which is why you aren’t seeing the same issue with send(@name, :enqueued). However, this still doesn’t work because the module is using the handle_cast(:enqueued, state) callback which should be handle_info(:enqueued, state) if you want to use send/2 and Process.send_after/3.