Comments (12)
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.
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.
@gbusker Possible to send through a PR with those mocks? Sound like a terrific enhancement for dev.
from rubyzoho.
@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.
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.
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']endAnd 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.
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.
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.
@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.
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.
@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.
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)
- NameError in creating a lead
- LoadError mime/types
- Proper method for retrieving records modified after HOT 3
- Missing fields.snapshot causes Passenger deployment issues HOT 5
- Data loss when saving Cases when no prior records exist HOT 6
- Cannot update custom fields if Lead initialized with parameters HOT 1
- Not getting the product details when making call to Invoice API HOT 7
- Bulk Insert Fields HOT 4
- Duplicate Check
- Custom field names HOT 4
- How do I use related_records method HOT 3
- Unable to add number of employees HOT 5
- Thoughts on refactor to allow for other Zoho services HOT 5
- Need to Access Deals HOT 2
- Adding/receiving products in SalesOrders
- Find by related id doesn't work HOT 1
- "Can't modify frozen string" error if working with ActiveSupport::HashWithIndifferentAccess HOT 1
- How to set Task.related_to Lead.id ?
- Zoho api v2 released. HOT 6
- RubyZoho: Web service call failed with 400 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rubyzoho.