Giter Site home page Giter Site logo

Comments (11)

pedro-stanaka avatar pedro-stanaka commented on July 28, 2024 1

@dereuromark After a more thorough study of the class I saw a big number of queries that will have to be rewritten to work on PostgreSQL. I am working on it on my fork, but right now I don't know if it is a good idea to work with switches based on Driver type.

I was thinking of just issuing a very basic query and then do some of the hard work on the application using features like MapReduce of the ORM, but any better ideas are appreciated.

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

Would be nice to have travis CI for the queue. So far it is only tests on MySQL.

Regarding the query, we can also implement a switch based on the type if we can't figure out a good solution.
Usually @lorenzo is the master of ORM :P Especially for this kind of query.

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

I added it to the test matrix for now as allow_failure: https://travis-ci.org/dereuromark/cakephp-queue/jobs/169676171
There might be other small issues to be fixed.

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

Any update here? Maybe someone has the time and can do the postgres support?

from cakephp-queue.

pedro-stanaka avatar pedro-stanaka commented on July 28, 2024

I actually began to work on it in my fork, but as soon as I realized the amount of queries that would need to be rewritten I put it on hold. It is too much effort to make it work only with postgres, if someone needs to work on other database then the person needs to rewrite everything again. My solution was to create a way simpler method using crontab. Since I am the opener of this issue, if you want @dereuromark you can close it.

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

Well, we can also part by part make the tests pass, and make it work with postgres.
We dont have to make it all work at once.
So feel free to PR.

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

Should only be 2 or 3 queries that really need some adjustments:
https://travis-ci.org/dereuromark/cakephp-queue/jobs/176869139

One is

SELECT (IFNULL(TIMESTAMPDIFF(SECOND, "2016-11-19 01:15:05", notbefore), 0)) AS `age`, QueuedTasks.id AS `QueuedTasks__id`, ...
FROM queued_tasks QueuedTasks 
WHERE ((completed) IS NULL AND (jobtype = 'task1' AND ((notbefore < '2016-11-19 01:15:05' OR (notbefore) IS NULL) AND (fetched < '2016-11-19 01:13:25' OR (fetched) IS NULL)) AND failed < 3)) 
ORDER BY priority ASC, age ASC, id ASC LIMIT 1

from cakephp-queue.

charlieboygis avatar charlieboygis commented on July 28, 2024

Hi, very smart lib.
I made an attempt to have PG support, you can look at my forked version here

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

Nice! You can make a PR once it is ready to be merged. Let me know if you need any help.

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

@charlieboygis Any update here? Can you please also check the latest PR regarding the duplicate issue for PG support?

from cakephp-queue.

dereuromark avatar dereuromark commented on July 28, 2024

Currently tests are not failing.
Does anyone want to take another stab here to fully integrate PostgreSQL?

from cakephp-queue.

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.