PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 297
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Nicofuma » Mon Jul 06, 2015 11:32 pm

Done, and the description is fixed.
Member of the phpBB Development-Team
No Support via PM

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 297
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Nicofuma » Tue Jul 07, 2015 8:03 am

Current state:
  • Image Implement a reparser service
  • Image Implement a command line to reparse everything
    • Image Dry run (PR ready)
    • Image Resume (PR ready)
  • Image Implement reparsing as a cron task
Member of the phpBB Development-Team
No Support via PM

User avatar
RMcGirr83
Registered User
Posts: 357
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by RMcGirr83 » Tue Jul 07, 2015 10:01 am

icon_thumbup.gif
icon_thumbup.gif (678 Bytes) Viewed 12818 times
Do not hire Christian Bullock he won't finish the job and will keep your money

User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by JoshyPHP » Tue Jul 07, 2015 12:16 pm

Nicofuma wrote:
Tue Jul 07, 2015 8:03 am
Image Implement reparsing as a cron task
Talking about cron, while working on --resume I was thinking that the same data used to resume CLI execution could be used for the cron task. It would make it possible to start reparsing with one and finish with the other. If both run at the same time, they'll interfere with each other's resumability but with no ill-effect apart from the wasted CPU cycles. The CLI could automatically postpone the next execution of the cron task to prevent that. During reparser:reparse execution, reschedule the cron task to 10 minutes into the future every time a set of records has been reparsed. It would continuously postpone the cron until the CLI is done or aborted.

Nicofuma
3.2 Release Manager
3.2 Release Manager
Posts: 297
Joined: Sun Apr 13, 2014 1:40 am
Location: Paris

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Nicofuma » Tue Jul 07, 2015 1:02 pm

Just use a lock in the database (2 actually) and the cron task will be runnable only if they are both released:

For each reparser:
- One reparse_done boolean
- One reparsing boolean

at the beginning of reparse_range, reparsing is set to true
at the end of reparse_range, reparsing is set to false
and in the cron task:
- is_runnable returns !reparse_done
- should_run returns !reparsing

You may need one cron task per reparser plugin but that's not an issue, they can use the same class and you will do everything in the service definition.
You may even reflect reparse_done and reparsing in the reparser plugin itself
Member of the phpBB Development-Team
No Support via PM

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by DavidIQ » Wed Jul 08, 2015 2:11 pm

RMcGirr83 wrote:
Tue Jul 07, 2015 10:01 am
icon_thumbup.gif
Off-topic: We should make this part of the default smiley set. :)
Image

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by Pony99CA » Thu Jul 09, 2015 1:29 am

DavidIQ wrote:
Wed Jul 08, 2015 2:11 pm
RMcGirr83 wrote:
Tue Jul 07, 2015 10:01 am
icon_thumbup.gif
Off-topic: We should make this part of the default smiley set. :)
I think that there should be quite a few extra smilies added, but thumbs up/down would be good starters. Just make sure that they're in the public domain. ;)

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
RMcGirr83
Registered User
Posts: 357
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by RMcGirr83 » Thu Jul 09, 2015 2:27 am

icon_thumbdown.gif
icon_thumbdown.gif (687 Bytes) Viewed 12537 times
Do not hire Christian Bullock he won't finish the job and will keep your money

User avatar
kinerity
Registered User
Posts: 22
Joined: Mon Sep 01, 2014 10:54 pm

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by kinerity » Sat Jul 11, 2015 8:53 pm

Just use these :P

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: PHPBB3-13803 / PHPBB3-13891 - Reparsing text

Post by VSE » Mon Jul 13, 2015 5:21 pm

How will this work with extensions that have created their own stored text with bbcodes (Board Rules, Pages, Board Announcements, etc.)?

Is there a method they can call in a migration file or something, to trigger the reparser on the content they have stored?
Has an irascible disposition.

Post Reply