Review Request 111654: add support for the discourse

Aaron J. Seigo aseigo at kde.org
Sun Jul 28 08:05:00 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111654/#review36630
-----------------------------------------------------------



sql/discourse.plsql
<http://git.reviewboard.kde.org/r/111654/#comment27038>

    raising an exception aborts the current transaction!
    
    the point of catching the exception on dblink here was to prevent that from happening, so you've managed to just recreate the problem.
    
    if put into its own function like this, it probably needs to return a bool and on catching the exception return false.
    
    however, this results in a new risk: all of the other uses of dblink in the following functions can raise an exception, so we rely on all the dblink calls that follow to work. to be 100% safe, an exception catch block is still needed in ct_createUserInDiscourse and ct_createForumInDiscourse
    
    as such, it probably doesn't make sense to try and factor out these 2 lines of code from 2 functions. 


- Aaron J. Seigo


On July 27, 2013, 12:50 p.m., Giorgos Tsiapaliokas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111654/
> -----------------------------------------------------------
> 
> (Updated July 27, 2013, 12:50 p.m.)
> 
> 
> Review request for Bodega.
> 
> 
> Description
> -------
> 
> This patch keeps in sync the DBs of the bodega-server and discourse.
> 
> It syncs,
> 
> a. the user accounts*
> b. for each asset that has a partner with id > 1000 it create a new forum which has a topic and a post
> 
> * there is a default account for the discourse
> username: forumadmin
> password: password
> 
> 
> Diffs
> -----
> 
>   server/bodegaDbHelper 273e34f 
>   sql/discourse.plsql PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/111654/diff/
> 
> 
> Testing
> -------
> 
> How to test it,
> 
> * git clone https://github.com/terietor/discourse.git
> * cd discourse
> * git checkout bodega
> * https://github.com/terietor/discourse/blob/master/docs/DEVELOPER-ADVANCED.md
> * cd bodega-server/server
> * make sql && make test-sql (your bodega user must be a superuser in order to enable the dblink extention)
> * then go back to discourse and do `bundle exec rails s`
> * go to localhost:3000
> 
> 
> Thanks,
> 
> Giorgos Tsiapaliokas
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/active/attachments/20130728/f3f9a3a1/attachment-0001.html>


More information about the Active mailing list