GithubHelp home page GithubHelp logo

recordDeferredEvents() flushes the entire current queue, drops them completely recordEvents() fails twice about keen-tracking.js HOT 11 CLOSED

dorkusprime avatar dorkusprime commented on June 1, 2024
recordDeferredEvents() flushes the entire current queue, drops them completely recordEvents() fails twice

from keen-tracking.js.

Comments (11)

dorkusprime avatar dorkusprime commented on June 1, 2024

Note: This is closely related to #52

from keen-tracking.js.

brandon-otoole avatar brandon-otoole commented on June 1, 2024

It looks like a lot of headache is coming from the fact that a new queue is being created each time recordDeferredEvents() is called. If queue was replaced with a of long-lived spooler, then the errors and retry logic could be handled internally. This adds more complexity compared to just adding the events back into the new queue. I think the advantage is that you could have more control and clarity regarding the retry logic.

Are you open to a solution that replaces queue? I have a rough solution outlined and I could work on an implementation.

from keen-tracking.js.

dorkusprime avatar dorkusprime commented on June 1, 2024

Hi there!

So I think a spool implementation might very well be the best way to go here, but – you're right – it's certainly a more complex direction than the simple queue-replacement strategy going on right now, which means it'll will require a decent number of new tests to make sure it all works as intended.

I'll defer to @dustinlarimer on this, but it seems like a good overall direction to me.

from keen-tracking.js.

dorkusprime avatar dorkusprime commented on June 1, 2024

@Paytons-Epic Dustin's currently at a conference, so I got ahold of him – he says go for it! Just mind the testing :)

from keen-tracking.js.

brandon-otoole avatar brandon-otoole commented on June 1, 2024

Hey, thanks for getting right back to me. Also, I am excited that @dustinlarimer is interested to see more.

I did a little work on the spool this weekend and I am pretty happy with it (as a general concept). I had some trouble getting the environment up and running so I can't write any tests or build the final file yet. I am going to hop onto the developer group and see if I can get some help sorting out the dependency issues that I am seeing. The instructions at https://github.com/keen/keen-tracking.js/blob/master/CONTRIBUTING.md didn't work and I can't tell if it is just my computer (linux vs mac or wrong version of Node, npm, gulp, etc).

from keen-tracking.js.

dustinlarimer avatar dustinlarimer commented on June 1, 2024

@Paytons-Epic sorry to hear about the install issues there - can you tell me more about your setup? Which versions of Node and NPM are you running? What errors (if any) are you seeing?

from keen-tracking.js.

brandon-otoole avatar brandon-otoole commented on June 1, 2024

@dustinlarimer I created a post in the developer group here. I tried to be very detailed, but let me know if you need more info. Hopefully I just overlooked something obvious and the solution is simple.

from keen-tracking.js.

dustinlarimer avatar dustinlarimer commented on June 1, 2024

@Paytons-Epic I found a post that seems related - do you think these steps might help? https://github.com/Medium/phantomjs#im-on-debian-or-ubuntu-and-the-installer-failed-because-it-couldnt-find-node

I'm on Debian or Ubuntu, and the installer failed because it couldn't find node
Some Linux distros tried to rename node to nodejs due to a package conflict. This is a non-portable change, and we do not try to support this. The official documentation recommends that you run apt-get install nodejs-legacy to symlink node to nodejs on those platforms, or many NodeJS programs won't work properly.

from keen-tracking.js.

brandon-otoole avatar brandon-otoole commented on June 1, 2024

@dustinlarimer That is a good call. I have been messed up by aptitude many times in the past. I no longer trust them as a worthy source for dev tools. Just to be sure, I checked with "$ which node" and "$which nodejs". The former pointed to the correct install path and latter didn't find an install path. It looks like I avoided the above issue.

I also asked a friend with a mac to do a fresh install and no luck. It looks like he got the same error. I will keep searching to see if I can stumble onto an effective way to pin down the source of the error.

In the meantime, I will turn some attention toward understanding the current tests and trying to determine what new tests will be needed for the spooler.

from keen-tracking.js.

brandon-otoole avatar brandon-otoole commented on June 1, 2024

I think I isolated the issue.

The compress task on about line 55 of 'gulpfile.js' was failing. As a quick workaround I subbed in uglifyjs. The files were built and compressed without issue. For now, this is good enough to get be back on track.

from keen-tracking.js.

adamkasprowicz avatar adamkasprowicz commented on June 1, 2024

This issue is solved in keen-tracking@3 - the library will automatically send requests few more times. https://github.com/keen/keen-tracking.js#handling-connection-problems

from keen-tracking.js.

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.