Skip to content

Conversation

@bodom0015
Copy link
Member

@bodom0015 bodom0015 commented Apr 21, 2025

Problem

Because they run as a FastAPI background_task, restarting the mmli-backend API server removes any running / pending ChemScraper jobs

Approach

  • feat: connect up to the /jobs endpoint to submit ChemScraper as a Kubernetes Job

How to Test

Currently deployed on chemscraper-frontend-staging
Relies on moleculemaker/mmli-backend#82

  1. Navigate to https://chemscraper.frontend.staging.mmli1.ncsa.illinois.edu/configuration
  2. Upload a PDF file to the frontend, and click Analyze
    • You should see a Job ID is returned for your new ChemScraper Job
    • You should see that your job is submitted to the backend
  3. Check the cluster for your running pod: kubectl get pod -n staging
    • You should see a job that matches the Job ID you just submitted
    • NOTE: this part is the change from our previous workflow, which had no way to track jobs without checking the logs
  4. Wait for the job to complete
    • You should see the chemscraper-frontend navigates you to the results page for your job
    • You should see the results of your job visualized on this page

@bodom0015 bodom0015 changed the title feat: switch from analyzeDocuments endpoint to POST /jobs [WIP] feat: switch from analyzeDocuments endpoint to POST /jobs Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants