diff --git a/config/config.php b/config/config.php index 0beb099d..2cf2e98a 100644 --- a/config/config.php +++ b/config/config.php @@ -33,10 +33,10 @@ return (function () { ], ]; - $config['tmpDir'] = fixPath(env('WS_TMP_DIR', $config['path'])); + $config['tmpDir'] = fixPath(env('WS_TMP_DIR', ag($config, 'path'))); $config['storage'] += [ - 'dsn' => 'sqlite:' . ag($config, 'path') . '/db/watchstate_' . $config['storage']['version'] . '.db', + 'dsn' => 'sqlite:' . ag($config, 'path') . '/db/watchstate_' . ag($config, 'storage.version') . '.db', 'username' => null, 'password' => null, 'options' => [ @@ -67,7 +67,7 @@ return (function () { 'default' => [ 'options' => [ 'headers' => [ - 'User-Agent' => 'WatchState/' . ag($config, 'version'), + 'User-Agent' => ag($config, 'name') . '/' . ag($config, 'version'), ], 'timeout' => 300.0, 'extra' => [ diff --git a/src/Command.php b/src/Command.php index 5416f3e5..8c332e1f 100644 --- a/src/Command.php +++ b/src/Command.php @@ -76,7 +76,7 @@ class Command extends BaseCommand protected function single(\Closure $closure, OutputInterface $output): int { try { - if (!$this->lock($this->getName())) { + if (!$this->lock(getAppVersion() . ':' . $this->getName())) { $output->writeln( sprintf( 'The command \'%s\' is already running in another process.',