We have a plugin that exports existing pages in to .wiki files and makes it possible to import them later on. Pages are created through new WikitextContent()->doEditContent(). When importing several packages (of .wiki files) the Special:SMWAdmin 'refreshJob'-button should be used before the imported data is actually correctly viewable, otherwise the pages do not contain the semantic properties while viewing them.
Running the refreshData-maintenance script on the command line does not work efficiently as the button does.
So I've got a couple of questions;
Now the refreshJob does solve the problem, but we really don't want to execute the script everytime when there was a import..
- SMW version: 2.5.7
--MW version: 1.27.4
Just to clarify, I won't provide support for an outdated version.
I don't remember (or better I don't have the time to sift through old
code) but it could be this version already checks the revision state
and is skipping an update (keeping a cache entry for 1h mostly to
avoid running twice due to [2] but that will change in SMW 3.1 where
we keep track of the rev_id in the object table) when the revision was
seen before therefore the FORCED_UPDATE option is the recommended
option to skip the skipping.
UpdateJob for theFORCED_UPDATE as parameter [1]
- is there someway to call the refreshJob for a single title?
Yes, there is but is not for external use.
- What does the refreshJob-action acutally do? Does it call newUpdateJob,
newUpdateDispatcherJob, ect?
The refreshJob bundles a couple of IDs to be run as dispatching
instances for the rebuilder which ultimately calls the UpdateJob.
- What is the difference between running the refreshData on the command
line or through Special:SMWAdmin?
The command line execution of rebuildData calls the rebuilder
directly which in the final state calls the UpdateJob.
Now the refreshJob does solve the problem, but we really don't want to
execute the script everytime when there was a import..
Right, if at all you should work with the UpdateJob.
The UpdateJob is the only instance that will parse the content of a
page and will invoke Store::updateData process.
[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/Importer/ContentCreators/TextContentCreator.php#L109-L128
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/3.0.x/src/MediaWiki/Hooks/UserChange.php#L69-L77
[2] https://github.com/wikimedia/mediawiki/blob/master/includes/jobqueue/jobs/EnqueueJob.php
On 3/27/19, Youri vd Bogert notifications@github.com wrote:
Setup and configuration
- SMW version: 2.5.7
--MW version: 1.27.4- PHP version: 5.6.39-1+ubuntu16.04.1+deb.sury.org+1
- DB system MySQL (Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using
EditLine wrapper)Issue
We have a plugin that exports existing pages in to .wiki files and makes it
possible to import them later on. Pages are created throughnew WikitextContent()->doEditContent(). When importing several packages (of
.wiki files) the Special:SMWAdmin 'refreshJob'-button should be used before
the imported data is actually correctly viewable, otherwise the pages do not
contain the semantic properties while viewing them.Running the refreshData-maintenance script on the command line does not work
efficiently as the button does.So I've got a couple of questions;
- is there someway to call the refreshJob for a single title?
- What is the difference between running the refreshData on the command
line or through Special:SMWAdmin?- What does the refreshJob-action acutally do? Does it call newUpdateJob,
newUpdateDispatcherJob, ect?Now the refreshJob does solve the problem, but we really don't want to
execute the script everytime when there was a import..--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/3852
Thanks for leading me in the right direction James. I've worked out a fix to our problem.
Most helpful comment
Just to clarify, I won't provide support for an outdated version.
I don't remember (or better I don't have the time to sift through old
code) but it could be this version already checks the revision state
and is skipping an update (keeping a cache entry for 1h mostly to
avoid running twice due to [2] but that will change in SMW 3.1 where
we keep track of the rev_id in the object table) when the revision was
seen before therefore the
FORCED_UPDATEoption is the recommendedoption to skip the skipping.
UpdateJobfor thespecific title and use
FORCED_UPDATEas parameter [1]Yes, there is but is not for external use.
The
refreshJobbundles a couple of IDs to be run as dispatchinginstances for the rebuilder which ultimately calls the
UpdateJob.The command line execution of
rebuildDatacalls the rebuilderdirectly which in the final state calls the
UpdateJob.Right, if at all you should work with the
UpdateJob.The
UpdateJobis the only instance that will parse the content of apage and will invoke
Store::updateDataprocess.[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/Importer/ContentCreators/TextContentCreator.php#L109-L128
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/3.0.x/src/MediaWiki/Hooks/UserChange.php#L69-L77
[2] https://github.com/wikimedia/mediawiki/blob/master/includes/jobqueue/jobs/EnqueueJob.php
On 3/27/19, Youri vd Bogert notifications@github.com wrote: