Git Product home page Git Product logo

laravel-helper-functions's Introduction

Hi, I'm Dmitry Ivanov! Nice to meet you! I'm a Software Engineer, Laravel Developer, Open-Source Developer, Problem Solver, and Constant Learner.

laravel-helper-functions's People

Contributors

dmitry-ivanov avatar opiy-org avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravel-helper-functions's Issues

Solving: exec() unable to fork

Description:

I run about 1M+ background processes in a day using background process from a single initiator. Lots of time call_in_background throws "exec() unable to fork" error, though I have set all ulimit as was suggested in forums.

I recommend to implement proc_open instead of exec. Maybe provide this as an optional feature in the code.

Here's what I updated in BackgroundCommand.php, it fixed the issue for me. Ref https://bugs.php.net/bug.php?id=18833

Also if anyone has any idea why exec throws this error on background_call, please let me know :)

...

public function run(& $result,& $status){

        $command = $this->composeCommand();

        $command = is_windows_os()
            ? "start /B {$command}"
            : "({$command}) > /dev/null 2>&1 &";

  
		$process = proc_open(
				$command,
				array(
				0 => array("pipe", "r"), //STDIN
				1 => array("pipe", "w"), //STDOUT
				2 => array("pipe","w")), //STDERR
				$pipes
				);
		$result = stream_get_contents($pipes[1]);
		$error = stream_get_contents($pipes[2]);
		fclose($pipes[1]);
		fclose($pipes[2]);
		$status= proc_close($process);
		$result = explode("\n",trim($result));
	    return($error);
}

Не работает runInBackground на Windows

При запуске команды call_in_background на Windows выполнение команды не происходит, видимо из-за

protected function composeForRunInBackground()
{
    return "({$this->composeForRun()}) > /dev/null 2>&1 &";
}

Так как разрабатывать и отлаживать приходится в ОС Windows, то это не очень-то удобно.

call_in_background runs from /public in Lumen

Hello, I tried using call_in_background() in Lumen, but the command fails because it tries to run it from the /public folder instead of the application root and outputs "Could not open input file: artisan".

I think the function should try to run the command from the app root, not public folder.

call_in_background() Not working.

Hi,
this is a very good helper function, but i can't make it to work on Laravel 5.5
Calling the call_in_background('UpdateProductPrice:updateproductprice') is not triggering artisan command.
Could you check please and let me know how to debug this ?

Thank you!

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.