Commit Graph

3972 Commits

Author SHA1 Message Date
Keegan McAllister 23b8833ec5 Handle Tornado callback notify in a more generic, less HTTP-centric way
(imported from commit 85a74d1b40461236c4c95ad688e9796ab50f0bbf)
2013-03-22 15:51:23 -04:00
Keegan McAllister 8db92fd995 Split out the actual Tornado views from the callback handling / notification
(imported from commit 26d40556bf7f545d3606a01d83b16c7265bafb0e)
2013-03-22 15:50:35 -04:00
Keegan McAllister 591816d80e Use TornadoQueueClient in runtornado
(imported from commit cc4d5505987dc2826d177ff93d037b17f78072b8)
2013-03-22 15:39:07 -04:00
Keegan McAllister 373d3ece1c queue: Implement TornadoQueueClient
(imported from commit 2803bc91e42aa20d6e6dec87bfadd2f890268d05)
2013-03-22 15:39:07 -04:00
Waseem Daher 0f333fcd62 Remove misleading comment from jobs page.
(imported from commit 1974aeb5f20e80117ed51d029ca206df78b80d7d)
2013-03-22 14:37:54 -04:00
Waseem Daher 6760e68f94 integrations: Document Capistrano integration.
(imported from commit e26774e3657a71e8f21bf8ef2b1b1a9c289707da)
2013-03-22 14:37:54 -04:00
Leo Franchi 7837e36d0c Clean up some code by consolidating
(imported from commit 3978da70286174ad3666d08bcc8db2eb28446399)
2013-03-22 09:49:54 -04:00
Jessica McKellar 4f1bf1b2f2 realm_stats: restrict some usage stats to only active users.
They are more meaningful this way -- the fact that your bots that
never log in or inactive users don't have colored streams shouldn't
impact that statistic.

(imported from commit b39debda338cbbad06957bc969b42862a888026a)
2013-03-21 17:38:20 -04:00
Jessica McKellar 85086b6662 realm_stats: Also print enter-sends stats.
(imported from commit 34f9d9916e11ac2e2748ecbb8eb4f9a34a110340)
2013-03-21 17:38:20 -04:00
Leo Franchi 0184f31af0 Reprocess unread counts when subscribing to a stream.
This is required if the stream has unread messages in it
(from a previous subscription period). Otherwise the
unread count will be 0 until reload.

Fixes Trac #1117

(imported from commit 8f3d78eb52fdecb52456b0037cc89665c9027fbc)
2013-03-21 17:13:17 -04:00
Waseem Daher 1d503d75ac apps: Don't make fun of Windows users.
(imported from commit 40dc16dfebffe8c26867340dbb9eed2263668144)
2013-03-21 11:15:53 -04:00
Tim Abbott a8febf8fce Revert "to_dict: Update rendered_content in the database after rendered."
This reverts commit 4e5a370bc43defb5083cac3df45c649cf2366abf.

(imported from commit 745b4a98d0e3f67acaa207ba53e9250060dcfe06)
2013-03-21 10:30:23 -04:00
Leo Franchi 4edf85e730 Mark messages taller than the screen as read once we have moved past them
(imported from commit c142c2447a8f2b5ed40337a75c1afbaf05f9fecf)
2013-03-21 09:37:10 -04:00
Jeff Arnold a95b1a1a23 Revert "Automatically condense long messages"
This reverts commit 27244550d5d94980d7e33d8cc7c69708427dbbec.

(imported from commit e468051b8052d244beb09ba795605d70124254dd)
2013-03-20 18:45:12 -04:00
Jeff Arnold 795d968b91 Revert "Center the message condenser messages with respect to the message body"
This reverts commit da64f33551b500857bb91cb3ece959aafc9b1eb0.

(imported from commit 004f9a95cf5dfd4c4b8565d6eec15ceac27f7bf2)
2013-03-20 18:45:09 -04:00
Zev Benjamin e5c62d164c Center the message condenser messages with respect to the message body
Previously it was centered with respect to its enclosing div, which
looked slightly off.

(imported from commit da64f33551b500857bb91cb3ece959aafc9b1eb0)
2013-03-20 18:08:39 -04:00
Jeff Arnold c92d664b44 Automatically condense long messages
Addresses Trac #747.

(imported from commit 27244550d5d94980d7e33d8cc7c69708427dbbec)
2013-03-20 17:39:15 -04:00
Keegan McAllister 118cf4edec Modify encoding for URL fragment so Firefox doesn't decode it automatically
Fixes #826.

(imported from commit a4c0ada9559684db7e597686d9354219de742819)
2013-03-20 12:07:53 -04:00
Keegan McAllister e97c6f52ce Don't save narrow operators to the URL fragment if that's where they came from
In Firefox, prevents e.g. a slash in a stream name, which we wanted to store as
%2F, from converting back to a literal slash.

There is some appeal to normalizing the URL fragment after parsing, but in
general this way seems better.  It may decrease page load time on narrowed
views.

Doesn't yet fix #826; the URL is correct but the narrow is still wrong.

(imported from commit 32e3fa9e968139863f34b9698f1c8b39d06f0c14)
2013-03-20 12:07:53 -04:00
Keegan McAllister ae27deb30f Encode search operands using a cleaner-looking variant of URI encoding
Fixes #1098.

(imported from commit 1ed05248f3c6b69a48b9c74c0ce344621fe637b5)
2013-03-20 12:07:52 -04:00
Jessica McKellar 37e58b613d Truncate the tutorial stream name to fit the DB max stream name length.
(imported from commit e267656337f97d3ea14e14e957a405cf4fd2d06c)
2013-03-20 10:15:08 -04:00
Leo Franchi 6263c9ba1e Unify calculation of unread-count for notifications and use it in the title bar
Fixes trac #1004

(imported from commit 6f04d1d3ded198b46cc2ff1733b94b5c17beb581)
2013-03-20 10:09:40 -04:00
Tim Abbott 02554b28cb to_dict: Update rendered_content in the database after rendered.
This change could significantly load the database if pushed to prod at
the same time as:

    send_message: Save rendered message content to the database.

goes out.  So this should go out in a different prod push from that
commit.

(imported from commit 4e5a370bc43defb5083cac3df45c649cf2366abf)
2013-03-20 07:34:10 -04:00
Leo Franchi 2ce683421b Only show 'More Messages Below" if there are actually more messages below
This fixes Trac #1004

(imported from commit fa57936aaf5b5f4ec74569bee389d18b989d6b9f)
2013-03-19 16:21:36 -04:00
Jeff Arnold 8613f6052e In the actions popover, put the most basic/common actions first
(imported from commit b2de5c1accffc776abe651c2140643ad380bb1e8)
2013-03-19 14:35:11 -04:00
Waseem Daher e1e7978fae "Lead designer" job posting.
(imported from commit 1f9e00e45f69d47842524d715fe5e8a8a4a8b7df)
2013-03-19 13:28:53 -04:00
Zev Benjamin fdbf1cff6f puppet: Fix postgresql.conf typo
The name of the archive directory doesn't actually matter, but this
is what we're running in prod, so our config in git should match.

(imported from commit c3fbba4f0c988811b11f2c21cf4a2a32327575aa)
2013-03-19 12:51:46 -04:00
Keegan McAllister 77bc8efb3a humbug_git_config: Send test-post-receive notices to stream "test"
(imported from commit e14606237a020218c7306bf10dda7a474336f199)
2013-03-19 12:49:51 -04:00
Keegan McAllister ba41c635da humbug_git_config: Fix typo
(imported from commit 37e92f9b9ab11ee3e64c5af579bd902aa251ffd1)
2013-03-19 12:49:51 -04:00
Zev Benjamin cfe691dc48 puppet: Use hostnames in pg_hba.conf
We can do this now that we can use our servers' DNS names internally.

(imported from commit a8e672843e99c1b549a44b3528a5f6698ea9df54)
2013-03-19 12:16:39 -04:00
Zev Benjamin f3f1205522 Use verify-full when connecting to the database
Now that we can use our servers' DNS names internally, using
verify-full gives us a little bit of extra security.

(imported from commit 3a3715fa8a59851d4543112a55b5c6b24981442e)
2013-03-19 12:15:24 -04:00
Tim Abbott 17e9e56899 Fix get_stream caching the DoesNotExist value of None.
(imported from commit bdef7438758517ba9083ecc8bf110e3caa1ec041)
2013-03-19 11:17:31 -04:00
Leo Franchi c6f9dbdd54 Only sleep if there is more work to be done
(imported from commit f8a1380e0045c9470909c088a9d262f8a714c86e)
2013-03-19 09:55:12 -04:00
Leo Franchi 6d6c3364dc Rewrite message flag handling to fork out to a subprocess for batch handling
(imported from commit 1ef846f542950cabf32f8b176f5591cf5794a0ff)
2013-03-19 09:55:12 -04:00
Tim Abbott 9977cdde54 send_message: Save rendered message content to the database.
(imported from commit e5bd224687d5420f556b341286f03d3829973a3c)
2013-03-19 08:09:26 -04:00
Tim Abbott b0dedfa310 [south] Add rendered_content columns.
See the next commit for the models changes.

(imported from commit 90e753661f8abfcfcdb78a5bbc15ebaf7f2eff9b)
2013-03-19 08:09:26 -04:00
Keegan McAllister e8aec9d009 post-receive: Don't actually update servers on push to test-post-receive
Fixes #924.

(imported from commit 85789b39ef2665901c8a7c9560ef072d80d5e24d)
2013-03-18 17:21:13 -04:00
Tim Abbott b38a538f8c Rename userprofile_by_foo cache keys to user_profile_by_foo.
(imported from commit ef398abc48c9b81a3d339ffdce00bae274246d28)
2013-03-18 16:15:11 -04:00
Tim Abbott 8034980cc4 create_mit_user_if_needed: Check memcached before querying database.
This will save at least one database query whenever MIT users send
messages.

(imported from commit 9fd644885a380463d841762b8fafe928431e1263)
2013-03-18 16:15:11 -04:00
Tim Abbott 97d7d31b68 Rewrite internal_send_message to use check_send_message.
This will automatically fix bugs such as one in which
internal_send_message didn't properly strip() the subject argument
before sending a message.

We change the recipient_type argument to internal_send_message to take
the recipient type name (e.g. 'stream') both to better fit the API and
also because the previous code incorrectly handled huddles.

(imported from commit 78c2596d328f6bb1ce2eaa3eed9a9e48146e3b6a)
2013-03-18 16:15:11 -04:00
Tim Abbott bb80d1c58c Move check_send_message and helpers to actions.py.
(imported from commit d74c90e25bd63931955d2ad9b3890be53d674a48)
2013-03-18 16:15:11 -04:00
Tim Abbott ab04d6f403 check_send_message: Don't use json_success/error directly.
This is preparation for using it from internal_send_message as well.

(imported from commit 000784be7b40e0c93b38a5a916a4a915335ea821)
2013-03-18 16:15:11 -04:00
Tim Abbott fb77af8f10 Refactor send_message_backend to do checking in new function.
This is preparatory for using this new arguments checking function in
internal_send_message as well.

(imported from commit 578e09c50b8a700c019c7dd235b2d9527af34e39)
2013-03-18 16:15:11 -04:00
Tim Abbott 14efaea0bb send_message_backend: Reorganize subject argument checking.
(imported from commit 80daa46f47e7e5279f746db89b3632eeadb27325)
2013-03-18 16:15:11 -04:00
Tim Abbott 34021ffc29 debugging: Add commented-out code in settings.py to log all queries.
This is often useful when working on a local development system and so
seems worth putting in the code, but is so verbose that it probably
doesn't make sense to have on by default in development.

(imported from commit ddb7ae4c83136f96d69368a245ed64e7daf66f34)
2013-03-18 16:15:11 -04:00
Tim Abbott 9909c8dc19 send_message: Use a memcached for the UserProfile-by-id cache.
This cache should save 2 database queries whenever we send a private
message.  However, previously it was per-process (which meant it was
mostly useless) and also buggy (it never stored anything in the cache,
so that it was completely useless).  Switching this to our standard
memcached setup will address both problems.

(imported from commit 1d807f30704bccf28de33a80523488aedc58a9be)
2013-03-18 16:15:11 -04:00
Tim Abbott c1d3a5b5e5 Use more caching of UserProfile objects in views.
(imported from commit 3abcceeb4fac1cfa5a9944a6455c60f6512dce6e)
2013-03-18 16:15:10 -04:00
Tim Abbott a23f6be28d Cache the results of Recipient queries in our memcached cache.
(imported from commit a6ba25a9c62d2738e4738b076370e4b2bc0ffaba)
2013-03-18 16:15:10 -04:00
Tim Abbott 3c143db01a Add memcached caching for get_stream lookups.
(imported from commit a089c8a99eaa1fa28ce401859cac1bdf0eb92a69)
2013-03-18 16:15:10 -04:00
Tim Abbott 9c2a9eb288 send_message: Avoid querying the stream object twice.
(imported from commit c23aab232a40195d92ae4b0e68af390c3b6b20ad)
2013-03-18 16:15:10 -04:00