Vishnu Ks
1b0b135bfc
management: Remove unused imports from process_queue.
2017-08-08 14:13:19 -07:00
Vishnu Ks
0532b35c43
management: Remove unused imports from print_email_delivery_backlog.
2017-08-08 14:13:19 -07:00
Vishnu Ks
164badde13
management: Use self.get_realm in merge_streams.
...
The variable encoding is removed becuase it is not used
anywhere.
2017-08-08 14:13:19 -07:00
Vishnu Ks
6b46762384
management: Fix typo in get_realm CommandError message.
2017-08-08 14:13:19 -07:00
Vishnu Ks
27936fcfd4
management: Remove unused imports from makemessages.
2017-08-08 14:13:19 -07:00
Vishnu Ks
cf61349563
management: Use self.get_realm in logout_all_users.
2017-08-08 14:13:19 -07:00
Vishnu Ks
e28a007487
management: Use self.get_user in knight command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
3a2edc66f1
management: Use get_system_bot in initialize_voyager_db.
2017-08-08 14:13:19 -07:00
Vishnu Ks
f45b80aafe
management: Remove unused imports from initialize_voyager.
2017-08-08 14:13:19 -07:00
Vishnu Ks
05af206392
management: Remove unused imports from import command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
f58efdc3cb
management: Remove unused imports from export_usermessage_batch.
2017-08-08 14:13:19 -07:00
Vishnu Ks
28e76c990a
management: Remove unused imports from email_mirror command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
6687b236bf
management: Remove unused imports from deliver_email command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
b8dacf9bf6
management: Remove unused import from checkconfig command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
5ce0d85ccf
management: Remove unused import from check_redis command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
19f8da4995
management: Use self.get_realm in export command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
4e9dff09fd
management: Use self.get_realm in dump_messages.
2017-08-08 14:13:19 -07:00
Vishnu Ks
bc48c68c09
management: Use self.get_realm in reactivate_realm command.
2017-08-08 14:13:19 -07:00
Vishnu Ks
279af33ea2
management: Use self.get_realm in deactivate_realm.
2017-08-08 14:13:19 -07:00
Vishnu Ks
349d604ad5
management: Use self.get_realm in create_user.
2017-08-08 14:13:19 -07:00
Vishnu Ks
679fece79d
management: Add argument for specifying help in add_realm_args.
2017-08-08 14:13:19 -07:00
neiljp (Neil Pilgrim)
b782db48e1
mypy: Remove superfluous older 'type: ignore' annotations.
2017-08-08 11:27:51 -07:00
neiljp (Neil Pilgrim)
67f1a72aae
mypy: Ensure events test fails only due to settings absence.
2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim)
3711da0dc9
mypy: Mark request_data as Optional based on requests API.
2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim)
116b8dd9c9
mypy: Set assign_queue() parameter queue_type to not be Optional.
2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim)
24cc14c10d
mypy: Refer to default_stream in if statement, allowing type inference.
2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim)
60baedcab9
mypy: strict-optional fixes for Trello integration.
2017-08-07 21:27:50 -07:00
neiljp (Neil Pilgrim)
d9e36c8156
mypy: strict-optional fixes in zerver/tornado/socket.py.
2017-08-07 21:27:50 -07:00
Jack Zhang
d9c1ad5db2
hotspots.py: Add SEND_ALL flag.
...
Used to view all hotspots in development.
2017-08-05 18:32:37 -07:00
Harshit Bansal
5a5072730c
realm_emoji: Don't accept animated realm emoji with unequal dimensions.
...
Fixes : #3654 .
2017-08-05 18:07:21 -07:00
neiljp (Neil Pilgrim)
334348cbca
mypy: Use namedtuples for request objects in test_messages.py.
2017-08-05 17:53:18 -07:00
neiljp (Neil Pilgrim)
6bed9da353
mypy: Amend flock contextmanager to accept Union[int, IO[Any]].
2017-08-05 17:53:18 -07:00
Tim Abbott
fc0144f6e4
test_decorators: Annotate fake Request as HttpRequest.
2017-08-05 17:53:18 -07:00
Tim Abbott
4bb979d869
test_helpers: Fix annotation for avatar_disk_path.
2017-08-05 17:53:18 -07:00
neiljp (Neil Pilgrim)
3ca34bebdc
mypy: Use Callable as parameter for simulated_queue_client.
...
Previously the type was annotated as 'type'.
2017-08-05 12:08:59 -07:00
neiljp (Neil Pilgrim)
6717f361ec
mypy: Amend tornado_redirected_to_list calls to use Mapping.
2017-08-05 12:08:59 -07:00
Rishi Gupta
4bf8ac2498
generate_test_data: Replace source with non-Gutenberg text.
...
It's hard to find literature with the community tone we're going for, that
is consistent with the Zulip code of conduct, etc.
This commit removes the special tooling for Gutenberg plays, and changes the
text to be some mixture of scigen, Communications From Elsewhere,
chat.zulip.org, and various books from the public domain.
2017-08-05 11:04:35 -07:00
Rishi Gupta
4350b52740
generate_test_data: Fix remove_line_breaks algorithm.
2017-08-05 11:04:35 -07:00
Tim Abbott
dd49bec93c
Fix changing email addresses back after email change.
...
We apparently were not correctly clearing the user_profile's email
address from caches when changing email addresses, which meant that
trying to look up the old email in the user_profile caches would still
work.
Fixes #6035 .
2017-08-05 10:49:44 -07:00
Rishi Gupta
251bd3e577
registration.py: Remove first_in_realm from accounts_register.
...
The parent commit implies first_in_realm == realm_creation.
2017-08-05 10:17:14 -07:00
Rishi Gupta
ddbf8b9c3c
management: Remove create_realm.py.
...
This no longer does the correct thing (in terms of onboarding emails,
default streams, etc), and is tempting for new server admins to use.
Once we remove it we'll also have the invariant that we can't have a realm
without a user, which will simplify accounts_register a bit.
2017-08-05 10:17:14 -07:00
Vishnu Ks
e7f5da83ac
management: Create list realms command.
...
Fixes #5917 .
2017-08-04 14:25:03 -07:00
Steve Howell
63f7b9a579
Remove "all" option for flag-updating endpoint.
...
The "all" option for 'message/flags' was dangerous, as it could
apply to any of our flags. The only flag it made sense for, the
"read" flag, now has a dedicated endpoint.
2017-08-04 14:10:46 -07:00
Steve Howell
bc6543a236
Use do_mark_all_as_read() in bankrupt_users command.
2017-08-04 14:10:46 -07:00
Steve Howell
541156792e
Add /mark_all_as_read endpoint.
...
This change simplifies how we mark all messages as read. It also
speeds up the backend by taking advantage of our partial index
for unread messages. We also use a new statsd indicator.
2017-08-04 14:10:46 -07:00
Steve Howell
c5e4ce5278
Optimize show_unreads --fix approach.
...
This now breaks the process of cleaning up unread counts for
non-active streams into a three step process.
This allows us to use our unread message flags index, at least
in testing on dev. Here is the relevant excerpt from explain
analyze:
Bitmap Index Scan on zerver_usermessage_unread_message_id
2017-08-04 11:04:43 -07:00
Greg Price
cc30226af0
deliver_email: When disabled, sleep forever rather than exit.
...
This makes supervisor see the service as cheerfully running
and let it alone, rather than constantly retry starting it.
Because the crash/restart loop means repeatedly spending a
couple of seconds loading Django and the app, separated by
brief periods while supervisor notices the crash and acts
on it, it was actually consuming about 30-50% CPU on the
zulipchat.com staging server.
2017-08-03 16:28:19 -07:00
Steve Howell
e994ff36b5
Add option to fix unread messages for inactive streams.
2017-08-03 13:17:04 -07:00
Steve Howell
dad1c9326e
Add show_unreads management command.
...
This should help us troubleshoot anomalies with old unread
messages.
2017-08-03 13:17:04 -07:00
neiljp (Neil Pilgrim)
b19e62b7ce
mypy: Initialize search_term to {} rather than None & avoid Optional.
2017-08-03 11:09:50 -07:00