Skip to content

Instantly share code, notes, and snippets.

@cosmos-sajal
Created September 13, 2018 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmos-sajal/d55e7508fa3e377215c8d874ae50b4b7 to your computer and use it in GitHub Desktop.
Save cosmos-sajal/d55e7508fa3e377215c8d874ae50b4b7 to your computer and use it in GitHub Desktop.
Invoke LockHandlerUtil
$this->lockHandlerUtil = new LockHandlerUtil(
$this->getName(),
$this->getContainer()->get('kernel')->getRootDir()
);
// $this->getName() will return the current file name
// of the Command (Cron) in Symfony framework.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment