seebees/ironmq

obj.map function not defined

arieljake opened this issue · 13 comments

Hi seebees,

I have forked your ironMQ impl and am adding support for ironWorker. I am sticking to your code structure/style.

One thing is when I run my code, I get an error when I try to reuse this:

if (!err) {
obj = obj.map(function(queue) {
var tmp = queues(queue.name)
tmp.Timestamper = queue.Timestamper
return tmp
})
}

obj.map is undefined. Where does that function come from?

@arieljake obj is an array. The paramater obj is internal to the implementation so there is no type checking on it. If !err, then obj is an array.

If you publish your branch I can take a look at it.

oh i see, let me have a look

i will be publishing in the next hour or two as soon as i finish the group of APIs for tasks

latest is posted.

had to move away from your structure a little due to the multiple sub objects under project. have a look if you have time.

@arieljake I think that we can do a little combining and make it even simpler. I can break things up like I did in the simple-cloudwatch.

Give me a bit and I'll put together a pull and we can see how to merge this...

just updated again, has full task api

btw, i also updated the README so you can see how the API works for IronWorker

example:

project.listTasks because will have project.listScheduled and project.listCode soon

just fyi, i posted an update with scheduled tasks

one more to go...code

awesome, all done and committed.

two things:

  1. I added a check in the parseResponse function to only JSON.parse if the content-type is application/json
  2. test_ironmq.options wasn't passing for me until i added the port :443 to the nock url. Do we need to set the port to 80 if http is specified?

looking forward to hearing about how we can merge.

btw, huccum you never use semicolons?? :)

one last thing, i spoke to the iron.io guys and I think they'll add our library to the client code page on their site when we're ready.

@arieljake nice. I'll try and take a look soon.

I don't use semicolons because I like the way it looks. And I prefer leading tokens to trailing.

e.g.

;for(var i =1; i<5; i++){}

var a
   ,  b
   ,  c

etc.

Hey seebees,

I just added the bindings for IronCache. I'll implement tests and docs now, then I'll start to use the IronWorker and IronCache libraries for a project I am working on and make sure they work as expected.

@arieljake sorry, bit bussy. should be able to get some progress on this over the weekend.

Don't get it. What's the branch for?

On Jul 11, 2012, at 7:26 PM, remery reply@reply.github.com wrote:

@arieljake too busy. check out https://github.com/seebees/ironmq/tree/iron.io-all


Reply to this email directly or view it on GitHub:
#4 (comment)