Git Product home page Git Product logo

Comments (5)

olafWal avatar olafWal commented on September 26, 2024

Sorry, the patch has been corrupted, so again:
---------------------------8<----------------------------------

--- DeployCommand.php   2013-12-10 14:01:57.385970911 +0100
+++ DeployCommand.php.new   2013-12-10 14:03:51.477975039 +0100
@@ -31,6 +31,7 @@
             ->addOption('go', null, InputOption::VALUE_NONE, 'Do the deployment')
             ->addOption('rsync-options', null, InputOption::VALUE_NONE, 'Options to pass to the rsync executable')
             ->addOption('force-vendor', null, InputOption::VALUE_NONE, 'Force sync of vendor dir.')
+            ->addArgument('timeout', InputArgument::OPTIONAL, 'Process timeout')
             ;
     }
 
@@ -45,7 +46,10 @@
         $available_env = $this->getContainer()->getParameter('deploy.config');       
         
         $env = $input->getArgument('env');
-        
+        $timeout = $input->getArgument('timeout');
+        if(!$timeout) {
+            $timeout = 60;
+        }
         if (!in_array($env, array_keys($available_env))) {
             $output->writeln('Env value not valid.');
             exit();
@@ -82,7 +86,7 @@
             $command));
 
         $process = new Process($command);
-
+        $process->setTimeout($timeout);
         $output->writeln("\nSTART deploy\n--------------------------------------------");
 
         $process->run(function ($type, $buffer) use ($output) {

--------------------------->8-----------------------------------

from deploybundle.

hpatoio avatar hpatoio commented on September 26, 2024

Hello, I think is much better to have it as a parameter in the config file. In this way you don't have to specify it every time you write the command and you can also have a per environment timeout.

from deploybundle.

olafWal avatar olafWal commented on September 26, 2024

Hi,

i think you are right :-)

A parameter in the config file is even better!

from deploybundle.

hpatoio avatar hpatoio commented on September 26, 2024

Just committed this functionality. Please switch to dev-master your composer and tell me if you like it. I've updated the doc to, so you can find there how set the timeout.

from deploybundle.

olafWal avatar olafWal commented on September 26, 2024

I checked it out and it seems to work perfectly! Thank you very much!

from deploybundle.

Related Issues (7)

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.