]> git.parisson.com Git - telemeta.git/commitdiff
increase processes number
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 13 Dec 2015 21:17:42 +0000 (22:17 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 13 Dec 2015 21:17:42 +0000 (22:17 +0100)
add file to cache instead of scanning cache dir again and again
add CREM media dir (temp)

app/deploy/start_app.sh
docker-compose.yml
telemeta/cache.py
telemeta/locale
telemeta/pages
telemeta/views/item.py

index 9f3a5957aef77cb0fbe84b9baaeabce54d93470b..be957d1749877d54aceffc71b5ba6585549b89aa 100644 (file)
@@ -8,8 +8,8 @@ static='/opt/static/'
 
 # uwsgi params
 port=8000
-processes=4
-threads=4
+processes=32
+threads=2
 autoreload=3
 
 # stating apps
@@ -24,7 +24,7 @@ python $manage migrate --noinput
 python $manage collectstatic --noinput
 python $manage telemeta-create-admin-user
 python $manage telemeta-create-boilerplate
-python $manage update_index
+python $manage update_index --workers $processes
 
 # static files auto update
 watchmedo shell-command --patterns="*.js;*.css" --recursive \
index 1d653d82d0f48dbed8c66425a15604ae614750bf..4ee3ccd63e87473497a0499f840326b1e5861a5a 100644 (file)
@@ -25,7 +25,7 @@
 media:
   image: debian:wheezy
   volumes:
-     - ./media/:/opt/media
+     - /home/parisson/apps/DevBox/home/sandbox/media/:/opt/media
      - ./static/:/opt/static
   command: "true"
 
@@ -55,7 +55,7 @@ app:
     - media
   command: /bin/sh deploy/start_app.sh
   ports:
-    - "9000:9000"
+    - "9001:9000"
   expose:
     - "8000"
   links:
@@ -75,7 +75,7 @@ worker:
 nginx:
   image: nginx
   ports:
-    - "8000:80"
+    - "8001:80"
   volumes:
     - ./app/deploy/nginx-app.conf:/etc/nginx/conf.d/default.conf
     - ./log/:/var/log/nginx
index 8373095f9b49a99b3cd03a1a7c29bf15fc65be4e..5d2b3b7daad77e26de5dd475e730a27203d3f298 100644 (file)
@@ -57,9 +57,13 @@ class TelemetaCache(object):
                 list.append(file)
         return list
 
+    def add_file(self, file):
+        self.files.append(file)
+
+
     def exists(self, file):
-        if not file in self.files:
-            self.files = self.get_files()
+        #if not file in self.files:
+        #    self.files = self.get_files()
         return file in self.files
 
     def delete_item_data(self, public_id):
index 91973b13f9dc9405052727c0c525d342dee15562..4534a3d47e7909554637e87a637b1959db277941 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 91973b13f9dc9405052727c0c525d342dee15562
+Subproject commit 4534a3d47e7909554637e87a637b1959db277941
index f8324093174d077b674ac2c52eb0db6eaf815ab5..771dfcc58e26f43a507c3bc48fcb5ddde55ca0b1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f8324093174d077b674ac2c52eb0db6eaf815ab5
+Subproject commit 771dfcc58e26f43a507c3bc48fcb5ddde55ca0b1
index ca1f467ab2dcbded23c53b86c79dfda80af5357d..4d02acb1d170f99d6fb7bb993878b4a092f15ec8 100644 (file)
@@ -273,7 +273,8 @@ class ItemView(ItemBaseMixin):
                 f = open(path, 'w')
                 graph.render(output=path)
                 f.close()
-
+                self.cache_data.add_file(image_file)
+                
         response = StreamingHttpResponse(self.cache_data.read_stream_bin(image_file), content_type=mime_type)
         return response