Implement character death handling and periodic checks: Add logic to process characters with health <= 0 in EventsWorker and UserCharacterWorker, including immediate death handling during health updates and a scheduled death check every 12 hours. Introduce a new SQL query to retrieve characters with zero health.
This commit is contained in:
@@ -587,6 +587,11 @@ pub const QUERY_GET_USERS_TO_UPDATE: &str = r#"
|
||||
WHERE user_id IS NOT NULL;
|
||||
"#;
|
||||
|
||||
pub const QUERY_GET_CHARACTERS_ZERO_HEALTH: &str = r#"
|
||||
SELECT id FROM falukant_data."character"
|
||||
WHERE user_id IS NOT NULL AND health <= 0;
|
||||
"#;
|
||||
|
||||
// politics worker queries
|
||||
pub const QUERY_COUNT_OFFICES_PER_REGION: &str = r#"
|
||||
WITH
|
||||
|
||||
Reference in New Issue
Block a user