chore(process_tracker): use const instead of String for business_status (#4849)

Co-authored-by: SanchithHegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Pa1NarK
2024-06-14 17:08:34 +05:30
committed by GitHub
parent 6582729048
commit 40dfad89ac
14 changed files with 86 additions and 30 deletions

View File

@ -381,7 +381,9 @@ pub async fn update_api_key_expiry_task(
retry_count: Some(0),
schedule_time,
tracking_data: Some(updated_api_key_expiry_workflow_model),
business_status: Some("Pending".to_string()),
business_status: Some(String::from(
diesel_models::process_tracker::business_status::PENDING,
)),
status: Some(storage_enums::ProcessTrackerStatus::New),
updated_at: Some(current_time),
};
@ -450,7 +452,7 @@ pub async fn revoke_api_key_expiry_task(
let task_ids = vec![task_id];
let updated_process_tracker_data = storage::ProcessTrackerUpdate::StatusUpdate {
status: storage_enums::ProcessTrackerStatus::Finish,
business_status: Some("Revoked".to_string()),
business_status: Some(String::from(diesel_models::business_status::REVOKED)),
};
store