Skip to content

Conversation

@slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper commented Jun 16, 2025

Example:

# options on the whole service
counter = VirtualObject("counter", 
    enable_lazy_state=True, 
    journal_retention=timedelta(hours=1))

# Options on the handler
@counter.handler(
  inactivity_timeout=timedelta(minutes=1))
async def increment(ctx: ObjectContext, value: int) -> int:
    n = await ctx.get("counter", type_hint=int) or 0
    n += value
    ctx.set("counter", n)
    return n

@github-actions
Copy link

Test Results

  7 files  ±0    7 suites  ±0   4m 37s ⏱️ -4s
 54 tests ±0   53 ✅ +1  1 💤 ±0  0 ❌ ±0 
223 runs  ±0  220 ✅ +1  3 💤 ±0  0 ❌ ±0 

Results for commit 66d8364. ± Comparison against base commit 3363703.

Copy link
Contributor

@igalshilman igalshilman left a comment

Choose a reason for hiding this comment

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

looks good, we just need to use snake_case everywhere

@slinkydeveloper slinkydeveloper merged commit 576d838 into main Jun 17, 2025
5 checks passed
@slinkydeveloper slinkydeveloper deleted the discovery-manifest-v3 branch June 17, 2025 11:10
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants