This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
84 lines (78 loc) · 2.52 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
/**
* Temp Debugging Log Configuration
*/
$GLOBALS['TYPO3_CONF_VARS']['LOG']['TYPO3Incubator'] = [
'writerConfiguration' => [
\TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
'logFile' => 'typo3temp/var/logs/typo3incubator.log'
]
]
],
'processorConfiguration' => [
\TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
\TYPO3\CMS\Core\Log\Processor\MemoryUsageProcessor::class => [
'realMemoryUsage' => true,
'formatSize' => true
]
]
]
];
/**
* Default Configuration
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['queue'] = [
'configuration' => [
'default' => [
'backend' => \TYPO3Incubator\Jobqueue\Backend\DatabaseBackend::class,
'options' => [
'table' => 'jobqueue_job'
],
'defaultQueue' => 'default'
],
'rabbitmq' => [
'backend' => \TYPO3Incubator\Jobqueue\Backend\AmqpBackend::class,
'options' => [
'host' => 'localhost',
'port' => 5672,
'user' => 'guest',
'password' => 'guest',
'vhost' => '/',
/*'ssl' => [
'cafile' => '/some/path/cacert.pem',
'local_cert' => '/some/path/phpcert.pem',
'verify_peer' => true
]*/
],
'defaultQueue' => 'default',
'queues' => [],
'virtualQueues' => [
'name-of-the-virtual-queue' => [
'exchange' => 'name-of-the-exchange-to-use',
'routing' => 'routing-key-to-use'
]
]
]
],
'attemptsLimit' => 5
];
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'TYPO3Incubator.Jobqueue',
'example',
['Example' => 'index,queue,info'],
['Example' => 'queue,info']
);
if(TYPO3_MODE === 'BE') {
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
\TYPO3\CMS\Core\Resource\ResourceStorage::class,
\TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileAdd,
\TYPO3Incubator\Jobqueue\DemoSignalHandler::class,
'queueDemoTasks'
);
}