Multi siteaccess and notification

Author Message

Rémy Feuvrier

Thursday 14 April 2011 7:04:23 am

Hi,

Is there a clean way to use notification cronjob with multiple siteaccess ?

Trying to explain our problem.

We've got one eZ instance with a dozen of siteaccess. Each siteaccess have a domain or a subdomain declared in site.ini override and associated to a node.

First, I put runcronjobs.php in cron without anything. It take the default siteaccess to generate url, wich is not what we want. So I made a cron per siteaccess with -s option. Sounds good, but in fact it's not. -s option doesn't care where the new element is published.

Structure:
- Root
- - site1 (www.site.com)
- - site2 (www.site2.com)
- - site3 (aaa.site2.com)
-...

Cron:
1,31 * * * * www-data cd $EZPUBLISHROOT; $PHP runcronjobs.php -q -s site1 notification
2,32 * * * * www-data cd $EZPUBLISHROOT; $PHP runcronjobs.php -q -s site2 notification
3,33 * * * * www-data cd $EZPUBLISHROOT; $PHP runcronjobs.php -q -s site3 notification
...

Notification is just a cronpart where there's only notification.php ;)

If I put an object in site2 at 2:50, notification will be generated by the site1 cronjob which will send emails with wrong url.
In the same way, if I published an object at 3:31 (+seconds) in site1, notification will be generated with site2 cronjob !

So, is there a workaround to use notification like that or we have to made another notification script that respond to our need ?

Thanks for your answers or ideas ;)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:58:35
Script start
Timing: Jan 18 2025 02:58:35
Module start 'layout'
Timing: Jan 18 2025 02:58:35
Module start 'content'
Timing: Jan 18 2025 02:58:36
Module end 'content'
Timing: Jan 18 2025 02:58:36
Script end

Main resources:

Total runtime0.5171 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.1719152.6406
Module start 'layout' 0.00500.0023 741.812539.4844
Module start 'content' 0.00730.5084 781.2969414.0547
Module end 'content' 0.51570.0014 1,195.35168.1406
Script end 0.5171  1,203.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.6340160.0002
Check MTime0.00130.2459160.0001
Mysql Total
Database connection0.00060.111810.0006
Mysqli_queries0.476492.1193460.0104
Looping result0.00030.0658440.0000
Template Total0.493195.420.2466
Template load0.00210.408420.0011
Template processing0.491094.940120.2455
Template load and register function0.00020.045010.0002
states
state_id_array0.00070.142310.0007
state_identifier_array0.00080.155120.0004
Override
Cache load0.00180.3455290.0001
Sytem overhead
Fetch class attribute can translate value0.00050.092610.0005
Fetch class attribute name0.00060.117210.0006
XML
Image XML parsing0.00010.020310.0001
class_abstraction
Instantiating content class attribute0.00000.000710.0000
General
dbfile0.00120.2262100.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs