The Challenge
The Mobile Timesheet (MTS) system faced bottlenecks in processing high volumes of leave requests and activity logs. Manual synchronization of employee data and the sequential processing of bulk approvals often led to system timeouts and data inconsistency. Furthermore, the disconnect between leave approval and timesheet creation required a more robust background automation layer to ensure data integrity.
The Solution
Working within an iterative development lifecycle, I focused on enhancing the backend's reliability and automating core workforce workflows to minimize manual intervention.
- Workforce Automation with Apache Airflow: Engineered complex schedulers (DAGs) to handle high-frequency background tasks:
- Data Synchronization: Automated daily employee data updates from the master HR system.
- Automated Timesheet Lifecycle: Developed a pipeline where approved leaves automatically trigger background timesheet creation and status updates, ensuring 100% synchronization between leave and attendance records.
- High-Throughput Bulk Processing: Architected a parallel processing system using RabbitMQ. By offloading bulk leave approvals to a message queue, I enabled real-time status updates and ensured the system could handle hundreds of concurrent approvals without degrading user experience.
- Backend API Optimization: Refactored the core activity logging and leave management APIs to reduce latency and improve the mobile application's responsiveness.
- Proactive Production Support: Managed system monitoring and incident response, successfully identifying and resolving critical bugs in the approval logic and login authentication flows to maintain high system availability.
# Conceptual Airflow DAG for Leave-to-Timesheet Automation
from airflow import DAG
from airflow.operators.python import PythonOperator
def sync_leave_to_timesheet(leave_id):
# Logic to create timesheet entry after leave approval
# and update leave record status
pass
with DAG('mts_leave_automation', schedule_interval='@hourly') as dag:
sync_task = PythonOperator(
task_id='process_approved_leaves',
python_callable=sync_leave_to_timesheet
)