Leo Franchi
46415d4984
Add statsd helpers and wrappers
...
(imported from commit 9d5b805ae416a65ac49dda8e8e11d9831308116c)
2013-04-18 18:05:52 -04:00
Tim Abbott
5afe06e8cb
Decrease idle event queue timeout back to 10 minutes.
...
(imported from commit 1ca1c99c013f3e7f7e70e1fd9c5386b0d5a27b98)
2013-04-18 16:58:31 -04:00
Leo Franchi
aa75f51d5e
Catch IncompatibleProtoclErrors as well, since our failure to connect might happen during the initial handshake phase
...
(imported from commit 55115f19a5a101676e3ce1ca2a7b9cd2a2d5b028)
2013-04-18 15:46:43 -04:00
Leo Franchi
fb2b3ae21a
Handle multiple preregistration user objects when choosing streams
...
(imported from commit 52faa0256a719bed8a8ccc120f8177cce20450e2)
2013-04-17 15:48:30 -04:00
Leo Franchi
0aa20cb594
Rework saved consumer logic in TornadoQueue to always reconnect consumers
...
(imported from commit 0627d769349077c1e795db9215b17f538e9ec75c)
2013-04-17 12:11:28 -04:00
Leo Franchi
3681b77f22
Patch TornadoConnection to catch exceptions and continue reconnection
...
(imported from commit 6bf9086b6bdc35321b23bb92b35679e2a21f6333)
2013-04-17 11:29:08 -04:00
Leo Franchi
4adf2d5c26
Add on-close callback immediately after creating
...
(imported from commit 221f8c6306ef9b6c658d10b72e15dcfba83017e0)
2013-04-17 11:20:01 -04:00
Leo Franchi
d7a33485ad
Register a tornado atexit handler to disconnect from rabbitmq
...
(imported from commit b70650070f1df548794a9e3ff2948d134fd0c5de)
2013-04-16 11:49:03 -04:00
Leo Franchi
79a94a8e79
Delay queue creation if we're not connected in the TornadoQueueClient
...
(imported from commit c583693783322136927ae1a1018a61b2ffa6597f)
2013-04-16 10:04:48 -04:00
Leo Franchi
befe7c26d3
Don't send on-demand presence information for mit users
...
(imported from commit 711a197b9a8c1e6c66d768b240c7bce7595e5b3b)
2013-04-16 09:37:25 -04:00
Leo Franchi
c024653331
Build presence update for missed events properly
...
(imported from commit 15d75a2e0f5c5e1035b526df3aca443a2cffdf25)
2013-04-16 09:32:46 -04:00
Zev Benjamin
858d32b3c4
Increase event queue lifetime and decrease event queue GC frequency
...
(imported from commit 6328c0659e2144a8d7898cbb54eac25f1c21c983)
2013-04-12 15:32:51 -04:00
Tim Abbott
04c4321d90
Move PERSISTENT_QUEUE_FILENAME into settings.py.
...
(imported from commit e7d1378fd0cb3f3d894ff4a5b6ee44212bf3ce34)
2013-04-12 12:06:53 -04:00
Tim Abbott
f7406b9c7d
Don't write logs to the server's working directory when DEPLOYED.
...
Otherwise these logs will end up all getting split up when we switch
to the new deployment model.
(imported from commit 0514c296470be7113cab6c2f48e8dd33f1b9353d)
2013-04-12 11:54:50 -04:00
Leo Franchi
916c235d8c
Only show active users in presence list
...
(imported from commit 73c0347aa10b52f13f41bbd93ff5372750ffcd3e)
2013-04-12 09:53:50 -04:00
Leo Franchi
302cfcd48c
Send client information for initial presence and process time differential
...
(imported from commit 99a51b7cc8b6c51c4e82757a984d07603b2980e3)
2013-04-12 09:11:40 -04:00
Leo Franchi
5d4b2305fe
Send presence updates when a new user logs in for the first time, and when returning from inactive
...
This commit will incorrectly list past-online users as active, a shortcoming that is
addressed in the next commit
(imported from commit b018767df686f88c0ca939c067c573e4d7cea357)
2013-04-12 09:11:40 -04:00
Jessica McKellar
7175dc534a
Send invitation e-mails asynchronously through RabbitMQ.
...
This avoids 10s of seconds of delay when you invite several people at
once through the web UI.
(imported from commit 75acdbdb04caf62bbb08affc7796330246d8a00e)
2013-04-10 16:57:49 -04:00
Zev Benjamin
f6a6a6b220
Add per-stream desktop notifications
...
(imported from commit b4a0576847b3aec1495f017ca9805febe80c9275)
2013-04-10 16:11:27 -04:00
Zev Benjamin
a2010871e3
Make subscription properties less free-form
...
(imported from commit eda607c2abfa51d2dadddc7b9ecba3e2d0b5be4d)
2013-04-10 16:11:27 -04:00
Zev Benjamin
5e307f9cce
Fix calculation of number of active users
...
(imported from commit 0a74f1d8db51988ec806deb6af7cd8a6ef18d08c)
2013-04-09 13:35:09 -04:00
Tim Abbott
ea95a8b167
Future-proof adding new users to default streams.
...
The previous code for adding users to default streams wouldn't do so
if the user didn't have a PreregistrationUser row.
(imported from commit 25f1383f6771319542d07660b29d891368889212)
2013-04-09 11:58:07 -04:00
Tim Abbott
1b11eeb2bc
Simplify the default_subscriptions code path.
...
(imported from commit 62894a5949621465fcfd8d25372316d7ab495252)
2013-04-09 11:58:07 -04:00
Keegan McAllister
3c40dd3bf3
bugdown: Fix fenced_code for Python-Markdown 2.3
...
(imported from commit 3954444708e222217407df228f07d2cad402a02b)
2013-04-05 13:14:00 -04:00
Tim Abbott
fdefa06190
Eliminate use of old StreamColor model.
...
(imported from commit c72a06bdc44f30fb6bca299463e259262367e8c2)
2013-04-04 17:48:51 -04:00
Tim Abbott
f6affa8802
gather_subscriptions: Use the colors from the Subscription table.
...
(imported from commit c23829ad4141a97c61e21b970e5031eae20e24b4)
2013-04-04 17:48:51 -04:00
Leo Franchi
8fe82085c4
[schema][manual] Automatically subscribe users to default streams only after tutorial
...
(imported from commit 6511851c0aee2628bef597bf1310d6f96b0fd1d4)
2013-04-04 17:11:39 -04:00
Tim Abbott
0ee684a4b5
[schema] [manual] Add colors to the subscription model.
...
This is preparatory for removing the StreamColor model, so we also set
things up so anything changing the StreamColor model changes the
Subscription model too.
The manual task is to run the copy_colors.py management command after
deployment to each of staging and prod.
(imported from commit 1be7523ca59f5266eb2c4dc2009e31209ed49635)
2013-04-04 14:17:01 -04:00
Leo Franchi
0055107cfd
Use IANA's TLD list for auto-linkification detecting
...
(imported from commit 9103fdc92405b92300a793bd1d4f493df64b5b9c)
2013-04-03 09:58:17 -04:00
Leo Franchi
a5643efa14
Allow @ in urls
...
(imported from commit cb2ffe4a8f050e732bb06ab4609997be35577417)
2013-04-02 18:38:38 -04:00
Leo Franchi
d127d6f19f
Support up to one level deep of nested parens in urls
...
(imported from commit 3f314b16a47b5267ddb0d18aa6c5456656895f77)
2013-04-02 18:38:38 -04:00
Keegan McAllister
191231ab3d
bugdown: Whitelist URL schemes
...
(imported from commit 76e22cec3918c00faaa903baae74915cc5e64264)
2013-04-02 18:38:38 -04:00
Keegan McAllister
5d538d7a2a
bugdown: Allow colons in URLs
...
(imported from commit b57fc21f4508f2bff3cbc32a6359de686aa3a96e)
2013-04-02 18:38:38 -04:00
Tim Abbott
fa20696230
do_add_subscription: Don't unnecessarily fetch subscription from the database.
...
(imported from commit ffe2c8d2026b60a91dd54f10cfd9df0adbfd7acd)
2013-04-02 14:01:54 -04:00
Tim Abbott
2a46c46fa8
set_stream_color: Pass color to get_or_create.
...
(imported from commit 0d5f1fd227fd6dc337291d2d07ba24f96080e9e2)
2013-04-02 14:01:54 -04:00
Tim Abbott
1cec86eb2d
[manual] Remove now-unused User model.
...
I think all that one needs to do to deploy this commit is on developer
laptops, run `generate-fixtures --force`.
(imported from commit 34916341435fef0875b5a2c7f53c2f5606cd16cd)
2013-04-02 12:57:10 -04:00
Tim Abbott
a8e89962d8
Remove remaining direct usage of the User model.
...
(imported from commit c494b4e32761e9ce57115da918a86a1d6a0b6971)
2013-04-02 12:07:08 -04:00
Tim Abbott
5dbe8b4c17
[manual] Authenticate using a user_profile as request.user.
...
When this is deployed to staging, we need to run
./manage.py logout_all_users --realm=humbughq.com
When this is deployed to prod, we need to run
./manage.py logout_all_users
(imported from commit d6c6ea4b1c347f3d9122742db23c7b67767a7349)
2013-04-02 12:07:08 -04:00
Tim Abbott
2fcbb31dcf
Access the UserProfile's new is_active field rather than User's.
...
(imported from commit ed5bdaf3e3d6d20bfb741efdac48d30482ab9ef7)
2013-04-02 12:07:08 -04:00
Tim Abbott
1443edce00
Access the UserProfile's new email field rather than using User.
...
This is preparatory for stopping using the User model.
(imported from commit a1b0808c8cc2ddd19a25163f91c4f18620c9ce90)
2013-04-02 12:07:08 -04:00
Tim Abbott
3a35c5b00c
Add management command to logout all users.
...
This is intended to be used logging out users during our deployment of
the UserProfile merge, but it could be useful for other things too.
(imported from commit bfe896d854f997f7a4d06e5bc0f19ec5b1aa5e69)
2013-04-02 12:07:05 -04:00
Tim Abbott
303e77c07d
Fix clearing of user sessions.
...
Previously, we weren't clearing the users out of memcached (we just
killed them in the database), so in fact users were not logged out
when we deactivated them for an hour (when the memcached caches would
expire).
(imported from commit 0f0a2f70e003c184106c73b22b876f57c1ef3371)
2013-04-02 11:56:31 -04:00
Zev Benjamin
4a8d8e6fb4
Record statistics for event queues
...
(imported from commit 88f30a33f0717d5ad1b22a86cf311d7b67c69bf5)
2013-04-01 17:09:22 -04:00
Zev Benjamin
a73e2975d7
Add simple function for outputting statistics for use with munin
...
Eventually we will want to replace this with statsd.
(imported from commit 64246e9f2d13d72f53d009a5e3e456bc6be6296b)
2013-04-01 17:09:21 -04:00
Zev Benjamin
0e0b95ce83
Fix event queue pickle file location
...
The associated function was moved into zephyr.lib, but the file
location was never updated.
(imported from commit 24c3348533324b0af7c52d6a121eef8b00615275)
2013-04-01 17:09:21 -04:00
Zev Benjamin
6cee57b356
Fix several bugs when register() applies events
...
(imported from commit 5cd284c59022700de5c5d12182d2056366bf8617)
2013-04-01 15:45:14 -04:00
Tim Abbott
b82edb6fd6
[manual] Add User fields to the UserProfile model.
...
And keep the fields updated, by copying on UserProfile creation and
updating the UserProfile object whenever we're updating the User
object, and add management commands to (1) initially ensure that they
match and (2) check that they still match (aka that the updating code
is working).
The copy_user_to_userprofile migration needs to be run after this is
deployed to prod.
(imported from commit 0a598d2e10b1a7a2f5c67dd5140ea4bb8e1ec0b8)
2013-04-01 14:34:25 -04:00
Tim Abbott
bd27343eba
Fix incorrect use of user_id as a Recipient type_id.
...
This should be a user_profile_id.
(imported from commit 3d63a986a4584ba8933c4f8872ed9bb5f3928983)
2013-04-01 14:34:25 -04:00
Zev Benjamin
2c08fcca3a
Send an event when a subscription is added or removed
...
We don't yet send events on property changes, though.
(imported from commit 741e6aff7c6ce8b6a1fa48e4d95317d345c6993d)
2013-04-01 13:07:48 -04:00
Zev Benjamin
fe45b1c8ad
Send an event when a user joins or leaves the realm
...
(imported from commit fcedba2d9a3e8968e93faa396113cddd5bf36a9d)
2013-04-01 13:07:48 -04:00