You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
This task involves setting up a Redis service in TFRS that will allow cross-namespace access to the Redis cache in LCFS. The purpose is to replace the existing get_max_credit_offset methods in api/services/OrganizationService.py with a call to the Redis cache in LCFS. This call will fetch the available balance for an organization based on the organization_id and compliance_period. This new method will ensure that the TFRS system calculates the available balance for compliance reporting by pulling real-time data from the Redis cache in LCFS.
Purpose:
The purpose of this task is to streamline the process of calculating available balances for compliance reporting in TFRS by using Redis caching from LCFS. This approach will ensure that TFRS reflects the most up-to-date and accurate compliance unit balances when generating compliance reports or calculating potential penalties.
Development Requirements:
Set up a Redis service in TFRS with the ability to access the Redis instance in the LCFS namespace via a cross-namespace connection.
In api/services/OrganizationService.py, update the get_max_credit_offset methods to replace the current balance calculation logic with a Redis call to fetch the available balance for the organization_id and compliance_period from the LCFS cache.
Ensure that the Redis call retrieves the correct balance for the specified organization and compliance period.
Test the new Redis call thoroughly to ensure that the TFRS system accurately reflects available balances during compliance reporting.
Additional Context:
The Redis cache in LCFS stores the balances using the organization_id_compliance_period as the key. Ensure that the Redis call uses this format to fetch the appropriate value.
The available balance in Redis should include all current commitments and transactions, so TFRS reflects the true balance for compliance.
Any edge cases around missing or stale data in Redis should be handled appropriately to ensure no incorrect balances are returned.
The text was updated successfully, but these errors were encountered:
Description:
This task involves setting up a Redis service in TFRS that will allow cross-namespace access to the Redis cache in LCFS. The purpose is to replace the existing
get_max_credit_offset
methods inapi/services/OrganizationService.py
with a call to the Redis cache in LCFS. This call will fetch the available balance for an organization based on theorganization_id
andcompliance_period
. This new method will ensure that the TFRS system calculates the available balance for compliance reporting by pulling real-time data from the Redis cache in LCFS.Purpose:
The purpose of this task is to streamline the process of calculating available balances for compliance reporting in TFRS by using Redis caching from LCFS. This approach will ensure that TFRS reflects the most up-to-date and accurate compliance unit balances when generating compliance reports or calculating potential penalties.
Development Requirements:
api/services/OrganizationService.py
, update theget_max_credit_offset
methods to replace the current balance calculation logic with a Redis call to fetch the available balance for theorganization_id
andcompliance_period
from the LCFS cache.Additional Context:
organization_id_compliance_period
as the key. Ensure that the Redis call uses this format to fetch the appropriate value.The text was updated successfully, but these errors were encountered: