DEV Community

Discussion on: Implement real-time updates with Django REST Framework | Building Cryptocurrency API

Collapse
 
marcelolop3s profile image
Marcelo C. Lopes

Hello guys, because when this code snippet is active, rabbitmq is idle.

if not Cryptocurrency.objects:

crawl_currency()

while True:
sleep(15)
update_currency()

I didn't understand this logic, could someone help me