Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:36:21+00:00 2026-06-05T21:36:21+00:00

How can I change arguments passed to Celery programmatically? What do I have to

  • 0

How can I change arguments passed to Celery programmatically? What do I have to change in the following code:

from celery.task import PeriodicTask

class MyTask(PeriodicTask):
    run_every = timedelta(seconds=1)
    value = ''
    def run(self, **kwargs):
        print 'Passed value %s' % value

I’d like to be able to change the value property during application lifetime. The value will be probably a dictionary, but I doubt if it changes anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:36:23+00:00Added an answer on June 5, 2026 at 9:36 pm

    Why do you want to change the arguments? Who will pass the arguments each time? The run method is called by the Scheduler upon the specified schedule times.

    You can simply read the ‘value’ from a database or whatever.

    def run(self, **kwargs):
        value = get_value_from_database()
        print 'Passed value %s' % value
    

    Otherwise – you might need to create your custom Scheduler class as described here: http://celery.github.com/celery/userguide/periodic-tasks.html#using-custom-scheduler-classes, and override some of its methods..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class which parses the Command line arguments and then returns the
I have a class that takes many arguments to create. It’s a sort of
i can change custom color Rectangle with something like : #A125AA in xaml. But
I can change SQL at runtime. Can I do the same with LINQ ?
I can change the irb prompt mode with irb --prompt prompt-mode I can see
I know I can change the target when the shadow is over it, but
In MATLAB one can change the font name of things such as ylabel ,
I know I can change a border's object with item.layer.cornerRadius = floatValue; item.layer.borderWidth =
Where I can change compiler options for C# project in VisualStudio 2008 (without command
I know I can change the selectionStyle of a UITableViewCell to make it highlight

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.