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

Implement archive record function #144

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Implement archive record function #144

merged 1 commit into from
Jan 10, 2024

Conversation

smarlowucf
Copy link
Collaborator

And integrate archive into the adapter event loop. Each billing cycle is archived with metering and usage info included. With a default archive length of 6 months.

And integrate archive into the adapter event loop. Each billing
cycle is archived with metering and usage info included. With a
default archive length of 6 months.
@smarlowucf
Copy link
Collaborator Author

Example archive structure for one "month" of data:

[
  {
        'billing_time': '2024-02-09T18:11:59.527064+00:00',
        'billing_status': {
            'tier_1': {
                'record_id': 'd92c6e6556b14770994f5b64ebe3d339',
                'status': 'succeeded'
            }
        },
        'billed_usage': {
            'tier_1': 10
        },
        'usage_records': [
            {
                'managed_node_count': 9,
                'reporting_time': '2024-01-09T18:11:59.527673+00:00',
                'base_product': 'cpe:/o:suse:product:v1.2.3'
            },
            {
                'managed_node_count': 9,
                'reporting_time': '2024-01-09T18:11:59.529096+00:00',
                'base_product': 'cpe:/o:suse:product:v1.2.3'
            },
            {
                'managed_node_count': 10,
                'reporting_time': '2024-01-09T18:11:59.531424+00:00',
                'base_product': 'cpe:/o:suse:product:v1.2.3'
            }
        ]
    }
]

Copy link
Contributor

@rtamalin rtamalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Minor suggestion in comments.

Copy link
Contributor

@KeithMnemonic KeithMnemonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarlowucf smarlowucf merged commit f946719 into data-archive Jan 10, 2024
6 checks passed
@smarlowucf smarlowucf deleted the impl-archive branch January 10, 2024 18:48
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.

4 participants