Out of the box, on my host, jobs are not launching in Omeka S.
I have no error but a job such as a batch modification will be in starting mode forever with no modification to the items.
Solution 1 : Synchronous strategy
(limited)
A workaround could be to set the job strategy to “synchronous” with:
'service_manager' => [
'aliases' => [
'Omeka\Job\DispatchStrategy' => 'Omeka\Job\DispatchStrategy\Synchronous',
],
],
in local.config.php.
However, it is not a good solution for me. I have too many items (~22000) and some jobs could require more time than the timeout of the page. For example, I cannot index all my items with solr with this configuration.
Solution two - set php cli path without options
(works for batch jobs but only when Solr and Search are disabled - does not work for solr indexing process)
I tried to set the php cli path in local.config.php.
which php
gives me /shared/php/7.0/current/bin/php -c /sites/user/resource/wrapper/php70/php.ini
So I set the php cli path without options (Omeka S does not find php if I add the “-c …” part (user options))
'cli' => [
'phpcli_path' => '/shared/php/7.0/current/bin/php'
],
After that a batch job fails with the error:
2018-06-12T09:42:58+00:00 INFO (6): Indexing resource #48569 (items)
Fatal error: Uncaught Error: Class ‘SolrClient’ not found in /sites/user/www/www_alpha/afas/modules/Solr/src/Indexer.php:189
I think Search/Solr are trying to index the change and fail. Solr indexing (launched by the Search module) does not work with the same error.
If I disable Search and Solr, batch job are working fine.
Third solution - script
(not working at all)
Maybe the user options are necessary to work with Solr. I tried to set as php cli path a script containing:
#!/bin/bash
/shared/php/7.0/current/bin/php -c /sites/user/resource/wrapper/php70/php.ini $1
and then, in local.config.php, the path to this script.
Jobs are are in starting stade but never end and do nothing.
As you can see, there is no complete solution. Do someone has a idea are some thoughts I can share to my web host to fix jobs management in Omeka S?