Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

always use sidekiq for user sync

  • Loading branch information...
commit 9a3402876506dd980e3025c1919433b53af27374 1 parent e36e02b
@rkh rkh authored
Showing with 2 additions and 12 deletions.
  1. +0 −1  .travis.yml
  2. +2 −11 lib/travis/services/sync_user_.rb
View
1  .travis.yml
@@ -1,7 +1,6 @@
language: ruby
services:
- redis
- - rabbitmq
rvm:
- jruby-19mode
jdk:
View
13 lib/travis/services/sync_user_.rb
@@ -10,13 +10,8 @@ def run
end
def trigger_sync
- if Travis::Features.user_active?(:sync_via_sidekiq, user) or Travis::Features.enabled_for_all?(:sync_via_sidekiq)
- logger.info("Synchronizing via Sidekiq for user: #{user.login}")
- Travis::Sidekiq::SynchronizeUser.perform_async(user.id)
- else
- logger.info("Synchronizing via AMQP for user: #{user.login}")
- publisher.publish({ :user_id => user.id }, :type => 'sync')
- end
+ logger.info("Synchronizing via Sidekiq for user: #{user.login}")
+ Travis::Sidekiq::SynchronizeUser.perform_async(user.id)
user.update_column(:is_syncing, true)
true
end
@@ -25,10 +20,6 @@ def user
# TODO check that clients are only passing the id
@user ||= current_user || User.find(params[:id])
end
-
- def publisher
- Travis::Amqp::Publisher.new('sync.user')
- end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.