Skip to content

Commit

Permalink
Change time estimate to 333/sec for async
Browse files Browse the repository at this point in the history
  • Loading branch information
ehclark committed Nov 18, 2024
1 parent 19a8428 commit a59430c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/anyvar/restapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ async def _annotate_vcf_async(
# set response headers
response.status_code = status.HTTP_202_ACCEPTED
response.headers["Location"] = f"/vcf/{task_result.id}"
# estimate for time is 500 variants per second
retry_after = max(1, round((vcf_site_count * (2 if for_ref else 1)) / 500, 0))
# low side estimate for time is 333 variants per second
retry_after = max(1, round((vcf_site_count * (2 if for_ref else 1)) / 333, 0))
_logger.debug("%s - retry after is %s", task_result.id, str(retry_after))
response.headers["Retry-After"] = str(retry_after)
return RunStatusResponse(
Expand Down

0 comments on commit a59430c

Please sign in to comment.