Skip to content

Commit 840f5e6

Browse files
committed
div. job testing
1 parent a37a42f commit 840f5e6

File tree

7 files changed

+685
-453
lines changed

7 files changed

+685
-453
lines changed

.docker/xdebug/xdebug.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
xdebug.mode=debug
2+
xdebug.start_with_requests=yes
3+
xdebug.client_host=host.docker.internal

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ RUN apt-get update && \
55
apt-get install -y git && \
66
apt-get install -y zip unzip && \
77
apt-get install -y gnupg && \
8-
apt-get install -y wget
8+
apt-get install -y wget && \
9+
apt-get install -y vim
910

1011
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
1112
RUN echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
1213

13-
RUN apt-get update && \
14-
apt-get install -y mongodb-org
15-
1614
RUN docker-php-ext-install pcntl sysvmsg
1715
RUN pecl install mongodb && docker-php-ext-enable mongodb pcntl sysvmsg
1816

1917
# Install Composer
2018
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
19+
20+
RUN pecl install xdebug && docker-php-ext-enable xdebug
21+
COPY ./docker/xdebug/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

cgi-bin/cli.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@
2020

2121
if (isset($options['c'])) {
2222
switch ($options['c']) {
23-
case 'addJob':
24-
$logger->debug('add new job', [
23+
case 'addBasicJob':
24+
$logger->debug('add new basic job', [
2525
'category' => 'cli.php'
2626
]);
27-
$dic->get(SchedulerTesting\Job\JobHandling::class)->addJob();
27+
$dic->get(SchedulerTesting\Job\JobHandling::class)->addBasicJob();
28+
break;
29+
case 'addExtendedJob':
30+
$logger->debug('add new extended job', [
31+
'category' => 'cli.php'
32+
]);
33+
$dic->get(SchedulerTesting\Job\JobHandling::class)->addExtendedJob();
2834
break;
2935
case 'runScheduler':
3036
$logger->debug('start scheduler', [

0 commit comments

Comments
 (0)