From fcdcaaaa3c9fd83f6aeaeaf4e579467b2cfbd4ae Mon Sep 17 00:00:00 2001 From: Nam Huynh Date: Mon, 18 Oct 2021 14:42:07 +0700 Subject: [PATCH] update config struct --- config.go | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/config.go b/config.go index cd1fbf9..9aa4f88 100644 --- a/config.go +++ b/config.go @@ -3,18 +3,25 @@ package queue // Config ... type Config struct { // For message queue - Redis struct { - URL string - Password string - } + Redis ConfigRedis + // Priority to process task, eg: Critical 6, Default 3, Low 1 // Using for server only // https://github.com/hibiken/asynq/wiki/Queue-Priority Concurrency int - Priority struct { - Critical int - Default int - Low int - StrictMode bool - } + Priority ConfigPriority +} + +// ConfigRedis ... +type ConfigRedis struct { + URL string + Password string +} + +// ConfigPriority ... +type ConfigPriority struct { + Critical int + Default int + Low int + StrictMode bool }