rht
3f4bf2d22f
zerver/lib: Use python 3 syntax for typing.
...
Extracted from a larger commit by tabbott because these changes will
not create significant merge conflicts.
2017-11-21 20:56:40 -08:00
neiljp (Neil Pilgrim)
88424bed0b
mypy: Clarify types in add_missing_messages in soft_deactivation.py.
2017-11-07 11:26:46 -08:00
rht
f43e54d352
zerver/lib: Remove absolute_import.
2017-09-27 10:00:39 -07:00
Aditya Bansal
d9c9bfe7f6
logger: Add new create_logger abstraction to simplify logging.
...
This deduplicates a ton of Python logger-creation code to use a single
standard implementation, so we can avoid copy-paste problems.
2017-08-27 18:31:53 -07:00
Tim Abbott
e092f1afff
logging: Fix soft_deactivation log declaration.
...
Apparently, the soft deactivation log was incorrectly grabbing the
root logger, and thus screwing up where everything got logged.
2017-08-27 18:30:52 -07:00
Aditya Bansal
9d7e23c100
softdeactivation/management: Make specifying realm an optional arg.
2017-08-27 11:33:06 -07:00
Aditya Bansal
4578b9c613
soft-deactivation: Return list of soft deactivated/reactivated users.
...
do_soft_activate_users() and do_soft_deactivate_users() are modified
so as to maintain/return the list of affected users.
2017-08-15 22:05:19 -07:00
Aditya Bansal
34d30706da
soft-deactivation: Log users which were soft deactivate/reactivated.
2017-08-15 22:05:19 -07:00
Aditya Bansal
25d9c7eea1
soft_deactivation: Add helper functions.
...
This commits adds new helper functions which are:
* get_users_for_soft_deactivation(): This function can be used to
fetch a list of human users which pass the criteria of minimum
inactivity period (in days) passed as a parameter to the function.
* do_soft_activate_users(): Given a list of users this function
reactivates them and help them catch up with the missing message
rows for them in the UserMessage table.
2017-08-15 08:33:16 -07:00
Aditya Bansal
0cb909b978
events: Fill in missing messages for a returing soft_deactivated user.
2017-08-15 08:33:16 -07:00
Tim Abbott
ce670a7892
soft_deactivation: Document add_missing_messages algorithm.
2017-08-15 08:33:14 -07:00
Tim Abbott
14aaefdd46
soft_deactivation: rename find_and_store_to_insert_stream_msgs.
...
The original name was very verbose, and a bit less clear.
2017-08-15 08:29:51 -07:00
Tim Abbott
45bc599b02
soft_deactivation: Clean up user_messages_to_insert.
2017-08-15 08:29:51 -07:00
Aditya Bansal
57858596ab
soft_deactivation: Add new function 'add_missing_messages'.
...
This function will help us in creating undisturbed experience for
returning soft deactivated users.
Tweaked by tabbott to fix minor performance and clarity issues.
2017-08-15 08:29:51 -07:00
Aditya Bansal
dc5510ce44
soft_deactivation: Add helper functions for deactivating users.
2017-08-15 08:29:28 -07:00