openfoodfacts / openfoodfacts-query

This extracts key product data from MongoDB into a Postgres database to speed up OFF
GNU Affero General Public License v3.0
1 stars 0 forks source link

Can run multiple imports concurrently #19

Closed john-gom closed 8 months ago

john-gom commented 11 months ago

What

If an import is initiated via a browser, e.g. "/importfrommongo?from=" then the browser may trigger multiple requests which can result in multiple concurrent import processes.

Steps to reproduce the behavior:

  1. Trigger an import using a browser
  2. Observe the logs

Expected behavior

If an import is already running then subsequent requests should indicate that another import can't be started.

If an existing import has not indicated any activity for 5 minutes then it is assumed to have hung and a new import would be permitted.