Giter Club home page Giter Club logo

Comments (5)

christof-b avatar christof-b commented on August 20, 2024 1

I run into this issue too.
A simple solution could be to add an option for the lock file directory.
Currently this makes jobby unusable at shared hosts.

from jobby.

hellogerard avatar hellogerard commented on August 20, 2024

I think the assumption is that there is only a single app/website running on a machine. So there is only a single user that needs to run jobby. I could see this as a problem in a shared host environment, or if a machine is hosting multiple PHP apps.

The solution would not to be to open permissions on the lock file. The lock file name would have to differ among users so multiple lock files could exist at the same time.

from jobby.

ridaamirini avatar ridaamirini commented on August 20, 2024

Any updates ?

from jobby.

christof-b avatar christof-b commented on August 20, 2024

Currently I use a workarround right before initializing jobby:
ini_set('sys_temp_dir', '/path/to/users/temp/dir');

from jobby.

wujekbogdan avatar wujekbogdan commented on August 20, 2024

Any updates? I'm having the same issue on shared hosting. A solution would be to namespace the lock files with a unique namespace. The namespace could be configurable through one of the options passed to the Jobby constructor. It could default to '' in order to keep backwards compatibility.


EDIT
I'm looking at the source files and I found the following code:

    /**
     * @return string
     */
    protected function getLockFile()
    {
        $tmp = $this->tmpDir;
        $job = $this->helper->escape($this->job);

        if (!empty($this->config['environment'])) {
            $env = $this->helper->escape($this->config['environment']);

            return "$tmp/$env-$job.lck";
        } else {
            return "$tmp/$job.lck";
        }
    }

It seems that it is already implemented. The lock files are prefixed with the namespce defined by the environment setting.

from jobby.

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.