These are chat archives for mirumee/saleor

26th
Oct 2018
AJ
@ajostergaard
Oct 26 2018 06:53
@wulaaf presumably you have redis for your sessions and cache right? If not, you should. If so, why not reuse it for celery?
AJ
@ajostergaard
Oct 26 2018 06:58
@stephenmoloney Traditionally thumbnails should be generated when saving images, i.e. not on demand. I only use on demand for dev and debug.
@stephenmoloney from the docs: "in non-debug mode thumbnails are pregenerated by the worker’s task, fired after saving the instance"
M Abdullah Abid
@wulaaf
Oct 26 2018 07:37
@AJ, currently I'm not using redis but I shall look into it. When I researched celery and possible configs, I found that RabbitQ is preferred, easier and better. However, I don't know exactly how or why that is. As for sessions and cache, if I'm not using redis, how are they currently being handled?
AJ
@ajostergaard
Oct 26 2018 08:05
@wulaaf nothing is easier than redis just apt-get it (or similar) and set CACHE_URL=redis://localhost:6379/0 and CELERY_BROKER_URL=redis://localhost:6379/1 - done! (Assuming only one etc.)
M Abdullah Abid
@wulaaf
Oct 26 2018 08:09
Alright bud. I'll give it a try.
Thanks
Stephen Moloney
@stephenmoloney
Oct 26 2018 08:22
@ajostergaard thanks for the info but I'm aware of all that. Really my question is just, if in debug/dev mode, the only way to serve thumbnails on the fly is to ensure that uwsgi is also the server rather than nginx - right ?
AJ
@ajostergaard
Oct 26 2018 08:24
@stephenmoloney depends on config, if uwsgi was configured to read the file from disk it would fail... The request has to get all the way to Django.
Stephen Moloney
@stephenmoloney
Oct 26 2018 08:27
@ajostergaard exactly, that's what I presumed.
I suppose ultimately, what is the benefit of creating images on demand, even in debug mode ?
(lower disk memory requirements)
?
I'm trying to ascertain if it has any real value.
Even in debug
AJ
@ajostergaard
Oct 26 2018 08:31
It's just one less thing you have to think about. :)
Stephen Moloney
@stephenmoloney
Oct 26 2018 09:22
does gitter have a search function (for this room) ?
AJ
@ajostergaard
Oct 26 2018 16:25
The results of a search for new rooms includes an intra-room search... I searched for 'redis' and see the redis rooms and my statement above about redis.
M Abdullah Abid
@wulaaf
Oct 26 2018 16:42
Ok
Stephen Moloney
@stephenmoloney
Oct 26 2018 17:03
@ajostergaard yea, just notice that now you mention it. a filter by room only would be nice..
M Abdullah Abid
@wulaaf
Oct 26 2018 17:08
Would also love having
Would also love having the ability to star/save posts
NyanKiyoshi
@NyanKiyoshi
Oct 26 2018 17:09
Posts or messages?
M Abdullah Abid
@wulaaf
Oct 26 2018 17:23
Both posts or messages. Something like the star option on WhatsApp.
Right now I have a OneNote page dedicated to storing ideas and workups I've discovered on gitter
NyanKiyoshi
@NyanKiyoshi
Oct 26 2018 17:24
Oh I see okay
M Abdullah Abid
@wulaaf
Oct 26 2018 17:27
@ajostergaard, running nginx, uwsgi, saleor, celery and redis, all on the same server shouldnt be an issue for a small project, right?
AJ
@ajostergaard
Oct 26 2018 18:42
@wulaaf not because they are all on the same server but you obviously need sufficient resources on the server. With so many important processes I'd always advise more than one core and a couple GB of memory. Of course it all depends how small a project and how slick you want responses to be - it's a balance. Personally I always start small but with a decent architecture so I can quickly add additional nodes.