Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 2.3 KB

File metadata and controls

51 lines (37 loc) · 2.3 KB

Development Status

This branch contains ongoing development for real-time ride tracking,matching ride requests and permission classes. Updates and implementations are in progress.

API Endpoints

Rider Endpoints

/api/rider/rides/	GET -	List all rides requested by the rider
/api/rider/rides/	POST -	Create a new ride request (Only if there is no active rides)
/api/rider/rides/{id}/	GET -	Retrieve details of a specific ride
/api/rider/rides/{id}/	PUT/PATCH	- Update ride info (only if status is 'requested')
/api/rider/rides/{id}/cancel-ride/ - POST	Cancel a ride (only if status is 'requested' or 'accepted')
/api/rider/rides/{id}/track-ride/	GET	- Get current ride status and driver location
image

Driver Endpoints

api/driver/rides/ — List available ride requests nearby
api/driver/rides/{id}/accept-ride/ — Accept a ride request
api/driver/rides/{id}/update_status/ — Update the ride status
api/driver/update-location/ — Update driver’s current location (no ride ID needed)
api/driver/rides/assigned-rides/ — List all rides assigned to the driver
api/driver/rides/{id}/assigned-ride-detail/ — Get details of a specific assigned ride
image

Real-time Ride Tracking with Celery

To enable real-time ride tracking simulation in this project, you need to run both Celery worker and Celery beat scheduler. Celery worker executes asynchronous tasks, while Celery beat schedules periodic tasks, such as updating ride locations every few seconds.

Running Celery and Celery Beat

Use the following commands in separate terminal windows:

# Start Celery worker
celery -A ride_sharing_api worker --loglevel=info
Screenshot from 2025-08-11 01-33-10
# Start Celery beat scheduler
celery -A ride_sharing_api beat --loglevel=info
Screenshot from 2025-08-11 01-32-55