Giter Club home page Giter Club logo

Comments (4)

chris104957 avatar chris104957 commented on July 18, 2024

Is this on a clean install or are you upgrading from a previous version of carrot?

from django-carrot.

chris104957 avatar chris104957 commented on July 18, 2024

The root cause here is that you are trying to create a ScheduledTask object with a non-unique task_name value. By default, when you create a new ScheduledTask object using the carrot.utilities.create_scheduled_task function, if you do not provide the task_name value, this will automatically default to the name of the task function you are trying to schedule (e.g. my_app.my_tasks.my_task). So, if you already have a ScheduledTask object for one function, and you try to create another one for the same function, without specifying the task_name parameter, this will cause this error.

Solution: Use the task_name parameter when using carrot.utilities.create_scheduled_task:

create_scheduled_task('my_app.my_tasks.task`, {'seconds': 5}, task_name='something unique', **task_kwargs)

I'm going to add validation to that function for version 1.3 so that its more clear in future what the issue is.

The version number thing is a weird issue that seems to have arisen from CI, this will also be fixed in 1.3

from django-carrot.

chris104957 avatar chris104957 commented on July 18, 2024

Fixed with #97

from django-carrot.

tehfink avatar tehfink commented on July 18, 2024

Thanks for the reply, and a great project!

Is this on a clean install or are you upgrading from a previous version of carrot?

A fresh install & in a new virtualenv.

Solution: Use the task_name parameter when using carrot.utilities.create_scheduled_task…

Thanks, I had seen this in the docs and was looking forward to trying it out! The problem was that the version of carrot installed via pip install django-carrot didn't include the task_name kwarg from 5bdfc14. Anyway, it has been 'fixed' by telling pip which changeset to install, e.g.:

pip install git+git://github.com/chris104957/django-carrot.git@ded8daa8edf66ffe06829ec064df15aa676c5567#egg=django-carrot

from django-carrot.

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.