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
fix: Add sync_mode for Sidekiq/Resque compatibility (#112)
* feat: Add sync_mode for Sidekiq/Resque compatibility
Send events synchronously on the calling thread instead of queuing
them for a background worker. Follows the same pattern as the Python
SDK: in sync_mode, events bypass the queue entirely and are sent
inline via Transport#send.
Retries are capped at 3 in sync mode (vs 10 in async) to avoid
blocking the calling thread for extended periods during API outages.
test_mode takes precedence over sync_mode to prevent accidental
network calls in test environments.
Usage: PostHog::Client.new(api_key: 'key', sync_mode: true)
Fixes#10
* Bump version to 3.6.0
* Guard sync_mode transport with mutex for thread safety
* Coordinate flush and shutdown with sync_lock
0 commit comments