stevespringett / nist-data-mirror

A simple Java command-line utility to mirror the CVE JSON data from NIST.
Apache License 2.0
206 stars 93 forks source link

Don't start the update process if one is already running #65

Open nigredo-tori opened 4 years ago

nigredo-tori commented 4 years ago

As of now, the update process is started once every 15 minutes. If nvd.nist.gov slows down for some reason (I've seen dramatic slowdowns a couple days ago), we can have two or more update processes running concurrently. I suggest doing something like this instead:

flock -n /tmp/nvd.lock /mirror.sh

so that the spawned process immediately exits if there is another one running.

chris-gillatt commented 4 years ago

Just change it to once per hour? Every 15 minutes seems fairly aggressive - no wonder nvd.nist.gov is slowing down!