Immediately write pulse card graphs to disk
Previously images in pulse emails were serialized to bytes and the bytes were kept in map stored in an atom. After all of the graphs were serialized, they were written to disk and the file handle was passed to the email library. This commit immediately writes the file to disk and returns a URL. This will no longer hold onto the memory need for all of the cards and can be GC'd right away. This also avoids writing static images like the no results image to disk evertime, rather than just reading it out of the JAR.
Showing
- src/metabase/api/pulse.clj 2 additions, 2 deletionssrc/metabase/api/pulse.clj
- src/metabase/email.clj 12 additions, 11 deletionssrc/metabase/email.clj
- src/metabase/email/messages.clj 15 additions, 42 deletionssrc/metabase/email/messages.clj
- src/metabase/pulse/render.clj 196 additions, 111 deletionssrc/metabase/pulse/render.clj
- test/metabase/pulse/render_test.clj 25 additions, 20 deletionstest/metabase/pulse/render_test.clj
- test/metabase/pulse_test.clj 2 additions, 2 deletionstest/metabase/pulse_test.clj
Please register or sign in to comment