Skip to content

chore: remove redundant initialize code and blockConcurrencyWhile#260

Merged
threepointone merged 4 commits intocloudflare:mainfrom
BlankParticle:chore/remove-redundant-code
Feb 9, 2026
Merged

chore: remove redundant initialize code and blockConcurrencyWhile#260
threepointone merged 4 commits intocloudflare:mainfrom
BlankParticle:chore/remove-redundant-code

Conversation

@BlankParticle
Copy link
Contributor

No description provided.

@BlankParticle BlankParticle changed the title chore: remove redundant initialize code and blockConcurrencyCall chore: remove redundant initialize code and blockConcurrencyWhile Jul 28, 2025
@threepointone threepointone force-pushed the chore/remove-redundant-code branch from e3a4a69 to 3801b5e Compare August 5, 2025 14:12
@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: 5e685b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
partyserver Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@threepointone threepointone force-pushed the chore/remove-redundant-code branch from 7774e60 to 3ed172e Compare February 9, 2026 03:27
BlankParticle and others added 4 commits February 9, 2026 03:28
Add tests for a hibernating server that verify setName/onStart initialization behavior: onStart runs before processing connections, runs only once with concurrent connections/requests, and that websocket messages work after initialization. Implement HibernatingOnStartServer (hibernate: true) with a delayed onStart that increments a counter, plus onConnect/onMessage/onRequest handlers that expose the counter. Update tests/worker imports and wrangler.toml to register the new Durable Object binding and include it in migrations.
Introduce an AlarmServer Durable Object and test to verify that alarms initialize the DO and call onAlarm without redundant blockConcurrencyWhile. Changes: add AlarmServer class (hibernate:true) with counter and alarmCount, implement onStart/onAlarm/onRequest; export AlarmServer in the test Env; import runDurableObjectAlarm and add a test that schedules an alarm, triggers it via runDurableObjectAlarm, and asserts onStart and alarmCount behavior; register AlarmServer in wrangler.jsonc. This ensures alarm-triggered initialization works as expected.
@threepointone threepointone force-pushed the chore/remove-redundant-code branch from 3ed172e to 5e685b7 Compare February 9, 2026 03:28
@threepointone threepointone merged commit ab133ec into cloudflare:main Feb 9, 2026
1 of 2 checks passed
This was referenced Feb 9, 2026
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.

2 participants