New Billing - per action credit consumption (#4398)
This commit is contained in:
@@ -68,6 +68,7 @@ WORKFLOW_RUN_BLOCK_PREFIX = "wrb"
|
||||
WORKFLOW_RUN_PREFIX = "wr"
|
||||
WORKFLOW_SCRIPT_PREFIX = "ws"
|
||||
WORKFLOW_TEMPLATE_PREFIX = "wt"
|
||||
ORGANIZATION_BILLING_PREFIX = "ob"
|
||||
|
||||
|
||||
def generate_workflow_id() -> str:
|
||||
@@ -260,6 +261,11 @@ def generate_script_block_id() -> str:
|
||||
return f"{SCRIPT_BLOCK_PREFIX}_{int_id}"
|
||||
|
||||
|
||||
def generate_billing_id() -> str:
|
||||
int_id = generate_id()
|
||||
return f"{ORGANIZATION_BILLING_PREFIX}_{int_id}"
|
||||
|
||||
|
||||
############# Helper functions below ##############
|
||||
def generate_id() -> int:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user