Celery task stops when calling helm installHow to Abort Celery Task upon deploy to Herokucelery worker lostIs it possible to suspend a Celery beat task but have other beat tasks still work?Task stops retrying after random number of triesCelery scheduled tasks created inside other tasks do not go to broker immediatelyCelery beat sometimes stops workingCelery Does Not Process Task in Kubernetes with RedisHow are periodic tasks deleted from Celery?Installing jFrog Artifactory via Helm, install errors

How does a blind passenger not die, if driver becomes unconscious

Why is the voltage measurement of this circuit different when the switch is on?

Computing a trigonometric integral

Folding basket - is there such a thing?

Is a single radon-daughter atom in air a solid?

Vanishing of certain coefficients coming from Coxeter groups

If I wouldn't want to read the story, is writing it still a good idea?

Iterate MapThread with matrices

If the world have massive single giant world tree can it stop earthquake?

Apply brace expansion in "reverse order"

Does x-ray lead paint detection find lead underneath latex topcoats?

Underbar nabla symbol doesn't work

What is the origin of Scooby-Doo's name?

Where can I find a database of galactic spectra?

Does this Wild Magic result affect the sorcerer or just other creatures?

Why aren't cotton tents more popular?

C-152 carb heat on before landing in hot weather?

Does squid ink pasta bleed?

What does "play with your toy’s toys" mean?

How can I politely work my way around not liking coffee or beer when it comes to professional networking?

Are there any efficient algorithms to solve longest path problem in networks with cycles?

How dangerous are set-size assumptions?

Can ADFS connect to other SSO services?

Is this one of the engines from the 9/11 aircraft?



Celery task stops when calling helm install


How to Abort Celery Task upon deploy to Herokucelery worker lostIs it possible to suspend a Celery beat task but have other beat tasks still work?Task stops retrying after random number of triesCelery scheduled tasks created inside other tasks do not go to broker immediatelyCelery beat sometimes stops workingCelery Does Not Process Task in Kubernetes with RedisHow are periodic tasks deleted from Celery?Installing jFrog Artifactory via Helm, install errors






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have a web server and celery beat worker that I am running on kubernetes.
In deployment, I call this command -



helm upgrade X ./X --set xImageTag=$TAG,nginxImageTag=$TAG --install



The pods are being restarted. If there is a running celery task - it is stopped in the middle and lost forever.
Is there a graceful way to prevent that from happening?



I am thinking about: using the pod PreStop hook OR creating something that will prevent the task from stopping.



I want the task to continue running even when deploying new code and calling



helm upgrade ..... --install.



I'm sure someone already had that problem, but I couldn't find anything online. Thanks!










share|improve this question




























    1















    I have a web server and celery beat worker that I am running on kubernetes.
    In deployment, I call this command -



    helm upgrade X ./X --set xImageTag=$TAG,nginxImageTag=$TAG --install



    The pods are being restarted. If there is a running celery task - it is stopped in the middle and lost forever.
    Is there a graceful way to prevent that from happening?



    I am thinking about: using the pod PreStop hook OR creating something that will prevent the task from stopping.



    I want the task to continue running even when deploying new code and calling



    helm upgrade ..... --install.



    I'm sure someone already had that problem, but I couldn't find anything online. Thanks!










    share|improve this question
























      1












      1








      1








      I have a web server and celery beat worker that I am running on kubernetes.
      In deployment, I call this command -



      helm upgrade X ./X --set xImageTag=$TAG,nginxImageTag=$TAG --install



      The pods are being restarted. If there is a running celery task - it is stopped in the middle and lost forever.
      Is there a graceful way to prevent that from happening?



      I am thinking about: using the pod PreStop hook OR creating something that will prevent the task from stopping.



      I want the task to continue running even when deploying new code and calling



      helm upgrade ..... --install.



      I'm sure someone already had that problem, but I couldn't find anything online. Thanks!










      share|improve this question














      I have a web server and celery beat worker that I am running on kubernetes.
      In deployment, I call this command -



      helm upgrade X ./X --set xImageTag=$TAG,nginxImageTag=$TAG --install



      The pods are being restarted. If there is a running celery task - it is stopped in the middle and lost forever.
      Is there a graceful way to prevent that from happening?



      I am thinking about: using the pod PreStop hook OR creating something that will prevent the task from stopping.



      I want the task to continue running even when deploying new code and calling



      helm upgrade ..... --install.



      I'm sure someone already had that problem, but I couldn't find anything online. Thanks!







      kubernetes celery hook celery-task celerybeat






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 9:38









      Shahaf ShavitShahaf Shavit

      416 bronze badges




      416 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          1














          We solved it by having the celery task programatically create a k8s job. Now the process of the celery task is executed in a k8s job, which won't be deleted in helm install. The celery task will create a k8s job, and die. The code for creating a k8s job programatically is here: blog.pythian.com/how-to-create-kubernetes-jobs-with-python .






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55334885%2fcelery-task-stops-when-calling-helm-install%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            We solved it by having the celery task programatically create a k8s job. Now the process of the celery task is executed in a k8s job, which won't be deleted in helm install. The celery task will create a k8s job, and die. The code for creating a k8s job programatically is here: blog.pythian.com/how-to-create-kubernetes-jobs-with-python .






            share|improve this answer



























              1














              We solved it by having the celery task programatically create a k8s job. Now the process of the celery task is executed in a k8s job, which won't be deleted in helm install. The celery task will create a k8s job, and die. The code for creating a k8s job programatically is here: blog.pythian.com/how-to-create-kubernetes-jobs-with-python .






              share|improve this answer

























                1












                1








                1







                We solved it by having the celery task programatically create a k8s job. Now the process of the celery task is executed in a k8s job, which won't be deleted in helm install. The celery task will create a k8s job, and die. The code for creating a k8s job programatically is here: blog.pythian.com/how-to-create-kubernetes-jobs-with-python .






                share|improve this answer













                We solved it by having the celery task programatically create a k8s job. Now the process of the celery task is executed in a k8s job, which won't be deleted in helm install. The celery task will create a k8s job, and die. The code for creating a k8s job programatically is here: blog.pythian.com/how-to-create-kubernetes-jobs-with-python .







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 15 at 7:40









                Shahaf ShavitShahaf Shavit

                416 bronze badges




                416 bronze badges





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55334885%2fcelery-task-stops-when-calling-helm-install%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript