gitlab-org--gitlab-foss/spec/models
Yorick Peterse b3566a0104
Stop using Sidekiq for updating Key#last_used_at
This makes things simpler as no scheduling is involved. Further we
remove the need for running a SELECT + UPDATE just to get the key and
update it, whereas we only need an UPDATE when setting last_used_at
directly in a request.

The added service class takes care of updating Key#last_used_at without
using Sidekiq. Further it makes sure we only try to obtain a Redis lease
if we're confident that we actually need to do so, instead of always
obtaining it. We also make sure to _only_ update last_used_at instead of
also updating updated_at.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
2017-09-20 14:24:14 +02:00
..
blob_viewer Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
ci Do not pass project path from YAML processor 2017-09-18 14:29:43 +02:00
concerns add controller spec 2017-09-06 09:00:57 -04:00
conversational_development_index Store & use ConvDev percentages returned by Version app 2017-08-07 20:52:08 +02:00
cycle_analytics Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
diff_viewer Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
hooks Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
issue Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
members Migrate events into a new format 2017-08-10 17:45:44 +02:00
merge_request Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
network Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
project_services Also treat newlines as separator, as people would do that 2017-09-13 20:24:19 +08:00
protected_branch Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
ability_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
abuse_report_spec.rb Optimize a few simple spec files by using set 2017-09-13 13:35:18 +02:00
appearance_spec.rb Optimize a few simple spec files by using set 2017-09-13 13:35:18 +02:00
application_setting_spec.rb Allow to use same periods for housekeeping tasks 2017-09-11 17:41:07 +02:00
award_emoji_spec.rb Merge branch 'master' into issue-discussions-refactor 2017-07-31 10:23:50 +02:00
blob_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
board_spec.rb
broadcast_message_spec.rb Fix caching of future broadcast messages 2017-08-21 17:58:37 +02:00
chat_name_spec.rb Optimize a few simple spec files by using set 2017-09-13 13:35:18 +02:00
chat_team_spec.rb Optimize a few simple spec files by using set 2017-09-13 13:35:18 +02:00
commit_range_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
commit_spec.rb Prepare Repository#merge for migration to Gitaly 2017-09-15 16:39:20 +02:00
commit_status_spec.rb Use script_failure. Add runner_system_failure. Improve spec. 2017-09-05 15:10:34 +09:00
compare_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
container_repository_spec.rb Prevent new / renamed project from using a repository path that already exists on disk 2017-08-25 20:06:06 +02:00
deploy_key_spec.rb Don't include EmailHelpers manually, pick with rspec 2017-08-03 21:55:48 +08:00
deploy_keys_project_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
deployment_spec.rb Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
diff_discussion_spec.rb Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
diff_note_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
discussion_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
email_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
environment_spec.rb Merge branch '29943-environment-folder' into 'security-9-5' 2017-09-07 20:22:16 -04:00
event_collection_spec.rb Use a specialized class for querying events 2017-08-10 17:45:49 +02:00
event_spec.rb Finish migration to the new events setup 2017-09-06 16:40:31 +02:00
external_issue_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
forked_project_link_spec.rb Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
generic_commit_status_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
global_milestone_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
gpg_key_spec.rb created services for keys 2017-09-15 15:35:24 +00:00
gpg_signature_spec.rb drop backwards compatibility for valid_signature 2017-09-05 12:18:33 +02:00
group_label_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
group_milestone_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
group_spec.rb Optimize SQL queries used in Groups::GroupMembersController#create 2017-09-05 15:54:07 -05:00
guest_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
identity_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
issue_collection_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
issue_spec.rb Only update the sidebar count caches when needed 2017-08-30 15:49:40 +02:00
key_spec.rb Stop using Sidekiq for updating Key#last_used_at 2017-09-20 14:24:14 +02:00
label_link_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
label_priority_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
label_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
legacy_diff_discussion_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
lfs_objects_project_spec.rb Fix syntax error in LFS objects specs 2017-09-13 13:35:18 +02:00
list_spec.rb Adjust tests to work with latest shoulda gem 2017-07-24 19:26:15 +03:00
member_spec.rb Optimize SQL queries used in Groups::GroupMembersController#create 2017-09-05 15:54:07 -05:00
merge_request_diff_commit_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
merge_request_diff_file_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
merge_request_diff_spec.rb Use described_class when possible 2017-07-27 14:31:53 +02:00
merge_request_spec.rb Resolve outdated diff discussions on push 2017-09-06 10:08:03 +01:00
milestone_spec.rb Fix rewriting issue references with group milestones 2017-09-20 09:55:54 +00:00
namespace_spec.rb Merge branch 'improve-share-locking-feature-for-subgroups' into 'master' 2017-09-07 18:29:47 +00:00
note_spec.rb add controller spec 2017-09-06 09:00:57 -04:00
notification_setting_spec.rb Remove events column from notification settings 2017-07-31 11:18:55 +01:00
pages_domain_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
personal_access_token_spec.rb Hide read_registry scope when registry is disabled on instance 2017-08-21 18:13:32 -04:00
project_authorization_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
project_auto_devops_spec.rb Add specs for warning message shown in Auto DevOps settings 2017-09-19 18:42:13 +02:00
project_feature_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
project_group_link_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
project_label_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
project_snippet_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
project_spec.rb Memoize pipelines for project download buttons 2017-09-14 13:20:05 +02:00
project_statistics_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
project_team_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
project_wiki_spec.rb Merge branch 'wiki_title' into 'master' 2017-08-07 16:37:44 +00:00
protectable_dropdown_spec.rb Whitelist or fix additional Gitlab/PublicSend cop violations 2017-08-14 12:14:11 -04:00
protected_branch_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
protected_tag_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
push_event_payload_spec.rb Migrate events into a new format 2017-08-10 17:45:44 +02:00
push_event_spec.rb Rework how recent push events are retrieved 2017-09-08 00:46:16 +02:00
redirect_route_spec.rb Fix conflicting redirect search 2017-08-08 10:30:07 -07:00
release_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
repository_spec.rb Prepare cherry-pick and revert for migration to Gitaly 2017-09-19 17:09:10 +00:00
route_spec.rb Fix style 2017-08-09 08:11:08 -07:00
sent_notification_spec.rb Ensure all project factories use :repository trait or :empty_project 2017-08-01 14:51:52 -04:00
service_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
snippet_blob_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
snippet_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
spam_log_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
subscription_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
system_note_metadata_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
timelog_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
todo_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
tree_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
trending_project_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
upload_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
user_agent_detail_spec.rb Remove superfluous type defs in specs 2017-07-27 14:31:52 +02:00
user_spec.rb Revert "Merge branch 'revert-f2421b2b' into 'master'" 2017-09-11 15:44:42 +00:00
wiki_directory_spec.rb Use described_class when possible 2017-07-27 14:31:53 +02:00
wiki_page_spec.rb Unescape HTML characters in Wiki title 2017-08-30 21:59:09 +02:00