GitHub PushEvent at 2014-09-18 13:35:20
Repository: signonotron2
Actor: fatbusinessman
Payload: {"shas":[["9ce500d6e048419d0ae889f1bcdf4c944a9dd35e","6518d16a85396e511b329a97b21dda0c9acebabc@digital.cabinet-office.gov.uk","Fix suspended_user factory.\n\nreason_for_suspension is mandatory for a suspended user","Alex Tomlins",false],["8c5db8562ae22448fa94da5096419086810c975d","6518d16a85396e511b329a97b21dda0c9acebabc@digital.cabinet-office.gov.uk","Improve indices on event_logs table.\n\nGiven we're nearly always selecting the most recent entries from the\ntable, extending the index to include the `created_at` column avoids\nhaving to do a filesort.\n\nWith original index:\nmysql> explain SELECT `event_logs`.* FROM `event_logs` WHERE `event_logs`.`uid` = 'fd016f20-f219-012f-9436-12313c09b582' AND `event_logs`.`event` = 'Account unsuspended' ORDER BY created_at DESC LIMIT 1\\G\n*************************** 1. row ***************************\n           id: 1\n  select_type: SIMPLE\n        table: event_logs\n         type: ref\npossible_keys: index_event_logs_on_uid\n          key: index_event_logs_on_uid\n      key_len: 767\n          ref: const\n         rows: 429655\n        Extra: Using where; Using filesort\n1 row in set (0.00 sec)\n\nWith updated index:\nmysql> explain SELECT `event_logs`.* FROM `event_logs` WHERE `event_logs`.`uid` = 'fd016f20-f219-012f-9436-12313c09b582' AND `event_logs`.`event` = 'Account unsuspended' ORDER BY created_at DESC LIMIT 1\\G\n*************************** 1. row ***************************\n           id: 1\n  select_type: SIMPLE\n        table: event_logs\n         type: ref\npossible_keys: index_event_logs_on_uid_and_created_at\n          key: index_event_logs_on_uid_and_created_at\n      key_len: 767\n          ref: const\n         rows: 432722\n        Extra: Using where\n1 row in set (0.00 sec)\n\nThis has required updating a test that was relying on the database\nreturning events with identical timestamps in a particular order.  This\nno longer holds with the new index.","Alex Tomlins",false],["0f5dbb743471b9ff2499a054b9236e9f4fff93e4","6518d16a85396e511b329a97b21dda0c9acebabc@digital.cabinet-office.gov.uk","Don't auto-suspend recently unsuspended users.\n\nAdditionally, don't send them spurious reminder emails.\n\nWe are currently having issues with the workflow for unsuspending a user\nwho has been auto-suspended. Currently when the user is unsuspended by\nan admin, the auto-suspension process will re-suspend them at 5am the\nfollowing day if they haven't logged in by then. This is a problem for\nmany users as they may work part-time, or in a different time zone, and\ntherefore not be able to login within that period.\n\nThis adds a 3 day grace period after unsuspension during which time the\naccount will not be auto-suspended.","Alex Tomlins",false],["83738e48cbf4cc68b3eae315aaf0d658b7bfc377","1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@fatbusinessman.com","Merge pull request #269 from alphagov/unsuspension_grace_period2\n\nDon't auto-suspend recently unsuspended users.","David Thompson",true]],"size":4,"ref":"refs/heads/master","head":"83738e48cbf4cc68b3eae315aaf0d658b7bfc377"}