2016-10-11 08:25:17 -04:00
|
|
|
class UserProjectAccessChangedService
|
|
|
|
def initialize(user_ids)
|
|
|
|
@user_ids = Array.wrap(user_ids)
|
|
|
|
end
|
|
|
|
|
2017-08-23 10:28:16 -04:00
|
|
|
def execute(blocking: true)
|
|
|
|
bulk_args = @user_ids.map { |id| [id] }
|
|
|
|
|
|
|
|
if blocking
|
|
|
|
AuthorizedProjectsWorker.bulk_perform_and_wait(bulk_args)
|
|
|
|
else
|
|
|
|
AuthorizedProjectsWorker.bulk_perform_async(bulk_args)
|
|
|
|
end
|
2016-10-11 08:25:17 -04:00
|
|
|
end
|
|
|
|
end
|