Skip to content

Commit

Permalink
Update comment explaining the reasoning of checking leftover credits …
Browse files Browse the repository at this point in the history
…before sync job
  • Loading branch information
zansinergise committed Aug 12, 2024
1 parent d38a654 commit 7bcf7ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rest/processing/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def new_sentinel_hub(deployment_endpoint=None):
def process_data_synchronously(process, width=None, height=None):
p = new_process(process, width=width, height=height, request_type=ProcessingRequestTypes.SYNC)

# need a comment here explaining why 10 credits exactly
# As we don't know before the execution of a sync job how much it will cost, we can check
# if the user has X amount of credits that will most likely cover the execution costs
ten_credits_as_pu = 10 / SH_PU_TO_PLATFORM_CREDIT_CONVERSION_RATE
check_leftover_credits(ten_credits_as_pu)

Expand Down

0 comments on commit 7bcf7ed

Please sign in to comment.