digitallyinduced / ihp

🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness
https://ihp.digitallyinduced.com/
MIT License
4.89k stars 194 forks source link

Job not running in dev mode #866

Open err0r500 opened 3 years ago

err0r500 commented 3 years ago

Hello, I tried to use jobs and they were not running at all before I added the WebApplication workers to the RootApplication Worker instance in main.hs :

instance Worker RootApplication where
  workers _ = workers WebApplication 

I use the master branch version of IHP but the project was initially created using v0.9 maybe it's related.

I don't know if it's a bug in code generation or a missing piece in the documentation. Best, Matthieu

valyagolev commented 3 years ago

thank you for this issue!

adding those lines and import Web.Worker to the top of that file helped

jeyj0 commented 3 years ago

If I remember correctly this was a bug in code generation in v0.9, so should be fixed for newly created projects.

mpscholten commented 3 years ago

Recently I still had the same issue, so also recent versions are still affected by this