mosquito-cr / mosquito

A background task runner for crystal applications supporting periodic (CRON) and manually queued jobs
MIT License
227 stars 24 forks source link

Mosquito should recover better when redis becomes unavailable #142

Closed robacarp closed 1 month ago

robacarp commented 4 months ago
Unhandled exception in spawn(name: mosquito.runners.queue_list.4351311088): Hostname lookup for fly-podb-redis.upstash.io failed: No address found (Socket::Addrinfo::Error)

  from /Users/robert/.asdf/installs/crystal/1.11.2/src/socket/addrinfo.cr:132:7 in 'initialize'
  from /Users/robert/.asdf/installs/crystal/1.11.2/src/socket/tcp_socket.cr:29:3 in 'initialize'
  from /Users/robert/.asdf/installs/crystal/1.11.2/src/socket/tcp_socket.cr:29:3 in 'new'
  from lib/redis/src/connection.cr:30:7 in 'initialize'
  from lib/redis/src/connection.cr:363:11 in 'run'
  from lib/redis/src/connection.cr:351:5 in 'run'
  from lib/redis/src/client.cr:71:24 in 'run'
  from lib/redis/src/commands/sorted_set.cr:21:5 in 'zrange'
  from lib/mosquito/src/mosquito/redis_backend.cr:125:21 in 'list_queues'
  from lib/mosquito/src/mosquito/runners/queue_list.cr:33:28 in 'each_run'
  from lib/mosquito/src/mosquito/runnable.cr:129:11 in '->'
  from /Users/robert/.asdf/installs/crystal/1.11.2/src/fiber.cr:146:11 in 'run'
  from /Users/robert/.asdf/installs/crystal/1.11.2/src/fiber.cr:98:34 in '->'