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:
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