Uploaded image for project: 'Airavata'
  1. Airavata
  2. AIRAVATA-3273

webpack-stats.json not getting cached



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Django Portal
    • Labels:


      By default, django-webpack-loader caches webpack-stats.json when DEBUG is false, but

      • it only does this on demand, so if there have no requests to the workspace app, it won't have cached the WORKSPACE webpack loader config
      • currently the Ansible deployment configures mod_wsgi to start two Django processes, so even in the portal has seen a request for a Django app and cached that webpack loader config, that would only apply to the process that handled that request and the other one may not have it cached

      This causes a problem during deployment because the webpack-stats.json file gets updated well before collectstatic runs to copy the JS/CSS files into the static/ folder.

      Here are some ideas on how to improve this situation:

      • only have 1 Django process. That's the default, and we can increase it on a gateway by gateway basis if we actually see the kind of load that would warrant it.
      • somehow trigger a load of the webpack loader assets on server startup so they are cached on startup. Maybe in AppConfig.ready()




            • Assignee:
              marcuschristie Marcus Christie
              marcuschristie Marcus Christie
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: