Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PurlDB: Monitor scanning jobs #334

Closed
DennisClark opened this issue Mar 12, 2024 · 2 comments
Closed

PurlDB: Monitor scanning jobs #334

DennisClark opened this issue Mar 12, 2024 · 2 comments
Assignees

Comments

@DennisClark
Copy link
Member

DennisClark commented Mar 12, 2024

We should have a way to check on the status of indexing/scanning jobs in PurlDB, this could be either an API endpoint that provide status on the symbols collections/indexing that are pending for a PURL; or it could a management command.

An API endpoint on the scan_queue would be best.

@pombredanne
Copy link
Member

@keshav-space I think this is completed now by @JonoYang ... do you mind to add a completion comment?

@pombredanne pombredanne moved this to In Progress in 04-purl2sym Apr 3, 2024
@keshav-space
Copy link
Member

keshav-space commented Apr 3, 2024

Completed by @JonoYang in:

The simple way to test this is to follow the below steps after installing PurlDB (https://github.com/nexB/purldb?tab=readme-ov-file#installation):

  1. Create a scan queue user using this command python3 manage_purldb.py create-scan-queue-worker-user <username> and get API key for user.
  2. Now visit /api/scan_queue/ make sure to provide your API key obtained in step 1 in request header. Ex: Authorization: Token <your-api-key>
  3. There you can get the scan_status for all the package being indexed.

Meaning of various scan_status.

 0 => 'new'  
 1 => 'submitted'  
 2 => 'in progress'  
 3 => 'scanned'  
 4 => 'indexed'  
 5 => 'failed'  
 6 => 'timeout'  
 7 => 'scan index failed'  

@github-project-automation github-project-automation bot moved this from In Progress to Done in 04-purl2sym Apr 3, 2024
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

No branches or pull requests

3 participants