Update database.py

Added DB query to poll for locked machines and return mach specs to the scheduler