| @@ 47-73 (lines=27) @@ | ||
| 44 | * @return void |
|
| 45 | * @see \Symfony\Component\Console\Command\Command::configure() |
|
| 46 | */ |
|
| 47 | protected function configure() |
|
| 48 | { |
|
| 49 | ||
| 50 | // initialize the command with the required/optional options |
|
| 51 | $this->setName('import:clear:pid-file') |
|
| 52 | ->setDescription('Clears the PID file from a previous import process, if it has not been cleaned up') |
|
| 53 | ->addOption( |
|
| 54 | InputOptionKeys::CONFIGURATION, |
|
| 55 | null, |
|
| 56 | InputOption::VALUE_REQUIRED, |
|
| 57 | 'Specify the pathname to the configuration file to use', |
|
| 58 | sprintf('%s/techdivision-import.json', getcwd()) |
|
| 59 | ) |
|
| 60 | ->addOption( |
|
| 61 | InputOptionKeys::LOG_LEVEL, |
|
| 62 | null, |
|
| 63 | InputOption::VALUE_REQUIRED, |
|
| 64 | 'The log level to use' |
|
| 65 | ) |
|
| 66 | ->addOption( |
|
| 67 | InputOptionKeys::PID_FILENAME, |
|
| 68 | null, |
|
| 69 | InputOption::VALUE_REQUIRED, |
|
| 70 | 'The explicit PID filename to use', |
|
| 71 | sprintf('%s/%s', sys_get_temp_dir(), Configuration::PID_FILENAME) |
|
| 72 | ); |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * Finally executes the simple command. |
|
| @@ 47-73 (lines=27) @@ | ||
| 44 | * @return void |
|
| 45 | * @see \Symfony\Component\Console\Command\Command::configure() |
|
| 46 | */ |
|
| 47 | protected function configure() |
|
| 48 | { |
|
| 49 | ||
| 50 | // initialize the command with the required/optional options |
|
| 51 | $this->setName('import:create:ok-file') |
|
| 52 | ->setDescription('Create\'s the OK file for the CSV files of the configured source directory') |
|
| 53 | ->addOption( |
|
| 54 | InputOptionKeys::CONFIGURATION, |
|
| 55 | null, |
|
| 56 | InputOption::VALUE_REQUIRED, |
|
| 57 | 'Specify the pathname to the configuration file to use', |
|
| 58 | sprintf('%s/techdivision-import.json', getcwd()) |
|
| 59 | ) |
|
| 60 | ->addOption( |
|
| 61 | InputOptionKeys::LOG_LEVEL, |
|
| 62 | null, |
|
| 63 | InputOption::VALUE_REQUIRED, |
|
| 64 | 'The log level to use' |
|
| 65 | ) |
|
| 66 | ->addOption( |
|
| 67 | InputOptionKeys::PID_FILENAME, |
|
| 68 | null, |
|
| 69 | InputOption::VALUE_REQUIRED, |
|
| 70 | 'The explicit PID filename to use', |
|
| 71 | sprintf('%s/%s', sys_get_temp_dir(), Configuration::PID_FILENAME) |
|
| 72 | ); |
|
| 73 | } |
|
| 74 | ||
| 75 | ||
| 76 | /** |
|