Open gethvi opened 10 months ago
Hmm, I believe that while bots should wait, the intelmqctl
is a one-time tool, so it in my opinion should end with a user-friendly command indicating starting Redis. On the other hand, the API wrapper should handle it gracefully, and just retry. What do you think?
Well, for some intelmqctl is a CLI "API" ;-)
Hmm, I believe that while bots should wait, the
intelmqctl
is a one-time tool, so it in my opinion should end with a user-friendly command indicating starting Redis. On the other hand, the API wrapper should handle it gracefully, and just retry. What do you think?
I agree that one-time tool should probably just notify the user that Redis is not (yet) ready and that the user should wait and try again.
The API wrapper should probably wait for a little while, but eventually do the same really. Redis can be unavailable for a quite a while if the dataset is big (or if it crashes again, this happend to us when redis - in docker container - ran out of memory).
On some occasions (after restarting Redis) connection to Redis is refused and this exception is raised:
This just means we should just wait for a while for Redis to load the dataset in memory, not necessarily throw this on the user.
This particular case is from intelmq manager calling the command:
sudo -u intelmq intelmqctl --type json list queues-and-status
.