How to disable hot reloading on file save

104 views
Skip to first unread message

Дмитрий Пахомов

unread,
May 12, 2017, 4:24:30 AM5/12/17
to Lagom Framework Users
Hi!
I want to run some migration code on app start and hot reloading become really annoying for this purpose: after i change some lines lagom tries to recompile my project and run migration again (i am checking that migration was already applied and do nothing but this check against db takes some time).
So is there a way to make hot reloading work like in a simple play project? I mean reload project on first request but not on each file save?

James Roper

unread,
May 15, 2017, 9:06:11 PM5/15/17
to Дмитрий Пахомов, Lagom Framework Users
Lagom doesn't support reloading on request, one reason why we decided to do that was that often microservices don't receive requests, they may just work with messages, for example.

You can turn hot reloads off altogether by telling Lagom not to watch any directories for changes:

lagomWatchDirectories := Nil

--
You received this message because you are subscribed to the Google Groups "Lagom Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framework+unsubscribe@googlegroups.com.
To post to this group, send email to lagom-framework@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/22e1fa90-285d-4fad-81f8-aa6bdeee0ea1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
James Roper
Software Engineer

Lightbend – Build reactive apps!
Twitter: @jroper

Federico Fissore

unread,
Jun 11, 2018, 7:13:16 AM6/11/18
to Lagom Framework Users [deprecated]
Hi

Where does lagomWatchDirectories go?

federico

Emanuel Oliveira

unread,
Aug 2, 2018, 4:21:31 PM8/2/18
to Lagom Framework Users [deprecated]
Hi, 

Federico, I guess that goes in build.sbt.
Reply all
Reply to author
Forward
0 new messages