Bot-detector / bot-detector-scraper

GNU General Public License v2.0
2 stars 2 forks source link

Graceful Shutdown of Scraper Script in Container Pod #41

Closed extreme4all closed 11 months ago

extreme4all commented 11 months ago

As a developer, I want the scraper script to run a shutdown sequence when the container pod is killed, So that it continues processing all messages in its send and receive queue until they are empty before shutting down.

Acceptance Criteria

  1. When the container pod running the scraper script is killed, the script should initiate a shutdown sequence.
  2. The shutdown sequence should ensure that all messages in the send and receive queue are processed before the script shuts down.
  3. No messages should be lost during the shutdown process.
  4. If processing all messages is not possible, the script should go into an error sequence, sending all messages back to Kafka.

Notes

RusticPotatoes commented 11 months ago

by scraper script you mean https://github.com/Bot-detector/bot-detector-scraper/blob/19dcbc20d0ec773f74d181bd4dd1fc3a7f12883b/docker-compose.yml#L68 (src\main_v2.py)?