Git Product home page Git Product logo

coce's People

Contributors

fredericd avatar mrenvoize avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

coce's Issues

Is this project still maintained?

I've had an issue (#8) open for a while and not had a response. We're hoping to use coce in production soon, but are reluctant to do so if it's still unstable.

Is this project abandoned? If so I'll possibly fork it and try and fix the problems.

Syndetics

Are there any plans to incorporate Syndetics into the mix? It would be nice to be able to include Syndetics into the options rather than side-by-side with Coce.

AWS returning {} for any ISBN?

I'm having a problem, and I think it's configured correctly, where Amazon is returning {} instead of a URL.

I think (but I could be wrong...) that Amazon now throttles calls to the Advertising API. For example:

ID 0684835290 not found on AWS because Throttling

and see here: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/TroubleshootingApplications.html#efficiency-guidelines

Coce certainly does more calls than that per second?

For whatever reason, Koha proper doesn't seem to have this problem with Amazon covers, but we don't require the Associate ID and go about it slightly differently there.

Just wondering if you had noticed it?

Problem

Good Morning,

I'm having the following error when trying to use:

23:02:21 web.1 | started with pid 3252
23:02:22 web.1 |
23:02:22 web.1 | module.js:340
23:02:22 web.1 | throw err;
23:02:22 web.1 | ^
23:02:22 web.1 | Error: Cannot find module 'coce'
23:02:22 web.1 | at Function.Module._resolveFilename (module.js:338:15)
23:02:22 web.1 | at Function.Module._load (module.js:280:25)
23:02:22 web.1 | at Module.require (module.js:364:17)
23:02:22 web.1 | at require (module.js:380:17)
23:02:22 web.1 | at Object. (/Volumes/Dados/Documents/Projetos/leevru/index.js:3:12)
23:02:22 web.1 | at Module._compile (module.js:456:26)
23:02:22 web.1 | at Object.Module._extensions..js (module.js:474:10)
23:02:22 web.1 | at Module.load (module.js:356:32)
23:02:22 web.1 | at Function.Module._load (module.js:312:12)
23:02:22 web.1 | at Function.Module.runMain (module.js:497:10)
23:02:22 web.1 | exited with code 8
23:02:22 system | sending SIGTERM to all processes

My code is here:

var coce = require('coce');

app.get('/isbn', function(request, response) {
var ids = '275403143X'.split(',');
var providers = 'gb'.split(',');
var fetcher = new coce.CoceFetcher(2000);

fetcher.fetch(ids, providers, function(url) {
    response.send("Teste");
});

});

Can you help me?

Thanks

Clearing not found covers

Sometimes a library gets a book or places an order before a title is released and all services may not have a cover yet.

It would be nice to have an option to expire cached blanks before cached covers found

Preferred cover URL protocol with fallback

I've no idea if the underlying APIs will even make this possible, however, it would be good to be able to specify a preferred protocol for the returned cover URLs (HTTP/HTTPS) and, if a cover is not available using the preferred protocol, a fallback URL is provided.

As I say, I've no idea if the various APIs provide both HTTP & HTTPS cover URLs but, if they do, this would be a good addition to Coce I think.

Sample config missing aws parameter

The sample coce config "config.json.sample" is missing the "accessKeyId" parameter relating to AWS credentials. This leads to getting no results from Amazon and regular application crashes with the following error:

/home/coce/coce/node_modules/aws-lib/lib/aws.js:78
if (err) throw err;
^
Error: metadata API response undefined
at ClientRequest.
(/home/coce/coce/node_modules/aws-lib/lib/aws.js:37:49)
at ClientRequest.g (events.js:180:16)
at ClientRequest.emit (events.js:92:17)
at Socket.emitTimeout (http.js:1797:10)
at Socket.g (events.js:180:16)
at Socket.emit (events.js:92:17)
at Socket._onTimeout (net.js:326:8)
at Timer.unrefTimeout as ontimeout

This is the same error reported at http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9580#c60

Adding the "accessKeyId" parameter to the config seems to fix the problem.

Errors should be returned as json

There are a couple of errors that can be thrown including 'id parameter is missing'.

These should be returned as json bodies to enable automatic handling at the other end as a posed to a special case having to be written.

Patch to follow

Frequent coce crashes

Seeing fairly regular crashes of coce with the following error:

http.js:690
    throw new Error('Can\'t set headers after they are sent.');
          ^
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:690:11)
    at ServerResponse.res.setHeader (/home/coce/coce/node_modules/express/node_m
odules/connect/lib/patch.js:134:22)
    at ServerResponse.res.set.res.header (/home/coce/coce/node_modules/express/l
ib/response.js:583:10)
    at ServerResponse.res.contentType.res.type (/home/coce/coce/node_modules/exp
ress/lib/response.js:450:15)
    at null.finish (/home/coce/coce/app.js:58:17)
    at CoceFetcher.increment (/home/coce/coce/coce.js:192:14)
    at IncomingMessage.<anonymous> (/home/coce/coce/coce.js:114:18)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:944:16
    at process._tickCallback (node.js:442:13)

We've been unable to determine the cause. Is there any debugging at our end that we can turn on that may help us find out what is causing this?

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.