lib/rails_cloud_tasks/scheduler.rb in rails-cloud-tasks-0.0.7 vs lib/rails_cloud_tasks/scheduler.rb in rails-cloud-tasks-0.0.8
- old
+ new
@@ -23,12 +23,13 @@
end
log_output(result)
end
def client
- @client ||= Google::Cloud::Scheduler.cloud_scheduler.configure do |config|
- config.credentials = credentials.generate(service_account_email)
- end
+ configure = lambda { |client|
+ client.configure.credentials = credentials.generate(service_account_email)
+ }
+ @client ||= Google::Cloud::Scheduler.cloud_scheduler.tap(&configure)
end
protected
def location_path