There is the remote possibility that these commands are executed more than once (it can happen that collect_metrics needs more than a minute on an overloaded server sometimes). I would suggest using flock -n lockfile command to avoid that and skip the execution if the process is running. Something like this:
@frafra the monitoring architecture is considered deprecated and obsolete, for several reasons.
That cron is not executed, unless you enable it inside the Dockerfile
https://github.com/GeoNode/geonode/blob/3d6ab6e0a5e536fecf75b28242d0301526f01e58/monitoring-cron#L1-L2
There is the remote possibility that these commands are executed more than once (it can happen that collect_metrics needs more than a minute on an overloaded server sometimes). I would suggest using
flock -n lockfile command
to avoid that and skip the execution if the process is running. Something like this: