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

add ability to configure global Redis namespace prefix #134

Closed dammer closed 6 months ago

dammer commented 6 months ago

https://github.com/mosquito-cr/mosquito/issues/133

SCAN_UUID=ryhNEB9tD2K8pvZDdNZKnT ./bin/app

Mosquito.configure do |settings|
  settings.redis_url = ENV["REDIS_URL"]? || "redis://localhost:6379/5"
  settings.global_prefix = ENV["SCAN_UUID"]?
end

Redis:

1715597220.661123 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:scheduled:*"
1715597220.962453 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:waiting:*"
1715597220.962801 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:scheduled:*"
1715597221.263722 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:waiting:*"
1715597221.263946 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:scheduled:*"
1715597221.565036 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:waiting:*"
1715597221.565360 [5 127.0.0.1:38410] "keys" "ryhNEB9tD2K8pvZDdNZKnT:mosquito:scheduled:*"
robacarp commented 6 months ago

I believe that this test failure on 1.4 is unrelated to this code -- and that 1.4 should probably not be a target anymore.