Giter VIP home page Giter VIP logo

Comments (12)

amalc avatar amalc commented on August 16, 2024

Apologies for not responding sooner. I'm traveling at the moment but will take a look. Which type of Zoho account are you using?

from rubyzoho.

gbusker avatar gbusker commented on August 16, 2024

I have the same issue especially when I do a lot of restarts during development. The issue really is that zoho connects and does a few API calls from the initializer which is maybe a bit too enthusiastic.

In my test suite I have mocked the CRM calls so no calls go out to the real API and in development I now just don't do any API calls.

from rubyzoho.

amalc avatar amalc commented on August 16, 2024

@gbusker Possible to send through a PR with those mocks? Sound like a terrific enhancement for dev.

from rubyzoho.

amalc avatar amalc commented on August 16, 2024

@christhesoul Accounts.all can be quite expensive in API calls because I think Zoho charges those to the top level limit. Do you do that once a day? We cache above the gem. I suppose the timing depends on your use case.

from rubyzoho.

tylerdavis avatar tylerdavis commented on August 16, 2024

I'm doing nothing but initializing and configuring my connection seen below in my rails app:

require 'ruby_zoho'

RubyZoho.configure do |config|
  config.api_key = '01441e437367c4be6f1a888asd3e1d6f3ab'
  config.crm_modules = ['Leads']
end

And this action alone is making 13 requests to my crm instance. That's before I even attempt a query.

from rubyzoho.

amalc avatar amalc commented on August 16, 2024

Do you see the same behavior after initialization? The Zoho API, as written
requires separate calls to inflect the fields for each module. Although
with just leads configured, I expect to see less than that.

Can you turn on the trace and upload the log?

On Mon, Jun 2, 2014 at 12:35 PM, Tyler Davis [email protected]
wrote:

I'm doing nothing but initializing and configuring my connection seen
below in my rails app:

require 'ruby_zoho'
RubyZoho.configure do |config|
config.api_key = '01441e437367c4be6f1a8883e1d6f3ab'
config.crm_modules = ['Leads']end

And this action alone is making 13 requests to my crm instance. That's
before I even attempt a query.


Reply to this email directly or view it on GitHub
#26 (comment).

from rubyzoho.

JunichiIto avatar JunichiIto commented on August 16, 2024

I had the same issue.

I was surprised at receiving "Zoho Error Code 4421: You crossed your license limit."

In my case, it seems RSpec test suites, that is, frequent restarting were silently consuming API limit. It was very hard to find the root cause.

I hope this issue would get fixed soon.

from rubyzoho.

florian2 avatar florian2 commented on August 16, 2024

Just for the record, we have the same problem.

in our case, we have rake tasks that of course start the rails-environment every 15 minutes :(

from rubyzoho.

amalc avatar amalc commented on August 16, 2024

@florian2 @JunichiIto Do you have any ideas about this? It's not obvious what the best option here is. Could just add a configuration option which just has the gem do nothing when its running in a test environment. But that will more than likely break any tests you've got. I've just added VCR to the gem to test without having to call the Zoho API and it works well. Would that option work for you? You'll need to add VCR to your code and wrap the tests with the VCR block.

from rubyzoho.

florian2 avatar florian2 commented on August 16, 2024

we ended up writing our own api-client for zoho crm. i think the concept, that for every reloading / starting of the environment this gem makes calls to zoho to (i guess) fetch the actual "structure" of the zoho objects is the root cause here. it adds up over a day. adding vcr for testing env is always a good idea :)

from rubyzoho.

amalc avatar amalc commented on August 16, 2024

@florian2 It can, yes. We use this feature to reduce to calls during development and testing.

RubyZoho.configure do |config|
  # Other stuff for initialization
  config.cache_fields = true
end

from rubyzoho.

amalc avatar amalc commented on August 16, 2024

FYI. A new version of the gem 0.5.0 switches to the newer Zoho search API. This effectively raises the number of API calls used in a day because search are no longer accounted for separately. I'm going to close this issue out. Re-open if somebody has an idea of how to test which can be incorporated into the gem. Thanks.

from rubyzoho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.