use mbc-common for DB initialization #29

Merged
merged 5 commits into from Apr 6, 2013

Projects

None yet

3 participants

@Lacrymology

depends on #28

merge that first

Lacrymology added some commits Apr 5, 2013
@Lacrymology Lacrymology add mbc-common requirement
Signed-off-by: Tomas Neme <lacrymology@gmail.com>
18299df
@Lacrymology Lacrymology use mbc-common.db instead of our local script
Signed-off-by: Tomas Neme <lacrymology@gmail.com>
4e64eb6
@Lacrymology Lacrymology remove local db init script
Signed-off-by: Tomas Neme <lacrymology@gmail.com>
07d480e
@xaiki
Member
xaiki commented Apr 5, 2013

this depends on #28

On 5 April 2013 15:07, Tomas Neme notifications@github.com wrote:

depends on #28


You can merge this Pull Request by running

git pull https://github.com/inaes-tic/mbc-mosto Lacrymology/mbc-common

Or view, comment on, or merge it at:

#29

Commit Summary

add mongo-driver file
add backups to gitignore
driver skeleton
basic requirements and simple methods
TEMPORARY db setup
load db collections
read playlists from DB function prototype
search scheds that overlap with the timeframe now-config.load_time
find the playlist referenced by the sched in the database, and turn it into
a Playlist object
create the Media and Playlist objects, and call the defined callback
don't need to pass the list as a parameter
subscribe to mubsub channel and update playlists
add new requirements
add the new driver
use the mongo driver in mosto
use occurrence id as playlist name (unique)
make sure _id is an ObjectId before changing it to hex string
separate C[R]UD message callbacks
move playlist driver choice to config file
Merge remote-tracking branch 'origin/master' into
Lacrymology/playlists/mongo-driver
add the option to pass config JSON objects to drivers
Merge branch 'master' into Lacrymology/playlists/mongo-driver
add mbc-common requirement
use mbc-common.db instead of our local script
remove local db init script

File Changes

M .gitignore (1)
M config.json (2)
A drivers/playlists/conf/mongo-driver.json (3)
A drivers/playlists/mongo-driver.js (100)
M drivers/playlists/playlists-driver.js (13)
M mosto.js (5)
M package.json (6)

Patch Links:

https://github.com/inaes-tic/mbc-mosto/pull/29.patch
https://github.com/inaes-tic/mbc-mosto/pull/29.diff

Niv Sardi

@jmrunge jmrunge commented on an outdated diff Apr 5, 2013
drivers/playlists/mongo-driver.js
@@ -0,0 +1,100 @@
+var config = require("./conf/mongo-driver"),
+ Playlist = require('../../api/Playlist'),
+ Media = require('../../api/Media'),
+ mubsub = require("mubsub"),
+ moment = require("moment"),
+ mbc = require('mbc-common');
@jmrunge
jmrunge Apr 5, 2013 Comisión de Cooperativas Tecnologicas. member

Indent? :)

@jmrunge jmrunge commented on the diff Apr 5, 2013
package.json
@@ -23,7 +23,11 @@
"underscore" : "1.2.x",
"node-uuid" : "1.3.x",
"xmlbuilder" : "0.3.x",
- "watchr" : ">=2.3"
+ "watchr" : ">=2.3",
+ "mubsub" : "git://github.com/inaes-tic/mubsub.git",
@jmrunge
jmrunge Apr 5, 2013 Comisión de Cooperativas Tecnologicas. member

Is this the same as using a submodule? Differences?

@Lacrymology
Lacrymology Apr 6, 2013

watcha talking about? I don't understand the question

@jmrunge
jmrunge Apr 6, 2013 Comisión de Cooperativas Tecnologicas. member

I always used git submodules for cloning another repo inside my repo. Didnt knew you could specify this in package.json. That was the question. What is the diference between a submodule and this?

Enviado desde mi BlackBerry

-----Original Message-----
From: Tomas Neme notifications@github.com
Date: Fri, 05 Apr 2013 17:43:45
To: inaes-tic/mbc-mostombc-mosto@noreply.github.com
Reply-To: inaes-tic/mbc-mosto reply@reply.github.com
Cc: Juan Martin Rungejmrunge@gmail.com
Subject: Re: [mbc-mosto] use mbc-common for DB initialization (#29)

@@ -23,7 +23,11 @@
"underscore" : "1.2.x",
"node-uuid" : "1.3.x",
"xmlbuilder" : "0.3.x",

  •    "watchr"      : ">=2.3"
    
  •    "watchr"      : ">=2.3",
    
  •    "mubsub"      : "git://github.com/inaes-tic/mubsub.git",
    

watcha talking about? I don't understand the question


Reply to this email directly or view it on GitHub:
https://github.com/inaes-tic/mbc-mosto/pull/29/files#r3682762

@Lacrymology
Lacrymology Apr 6, 2013

ah, the difference is that this way is not git-tracked. It's updated by npm upgrade (if we take care to bump the version on the other side) If we DON'T bump the version, then we need to manually delete it from node_modules and npm install again

@jmrunge
jmrunge Apr 6, 2013 Comisión de Cooperativas Tecnologicas. member

I like it, its more clear. We should try to put node-mlt this way too. @csrocha?

Enviado desde mi BlackBerry

-----Original Message-----
From: Tomas Neme notifications@github.com
Date: Fri, 05 Apr 2013 17:57:56
To: inaes-tic/mbc-mostombc-mosto@noreply.github.com
Reply-To: inaes-tic/mbc-mosto reply@reply.github.com
Cc: Juan Martin Rungejmrunge@gmail.com
Subject: Re: [mbc-mosto] use mbc-common for DB initialization (#29)

@@ -23,7 +23,11 @@
"underscore" : "1.2.x",
"node-uuid" : "1.3.x",
"xmlbuilder" : "0.3.x",

  •    "watchr"      : ">=2.3"
    
  •    "watchr"      : ">=2.3",
    
  •    "mubsub"      : "git://github.com/inaes-tic/mubsub.git",
    

ah, the difference is that this way is not git-tracked. It's updated by npm upgrade (if we take care to bump the version on the other side) If we DON'T bump the version, then we need to manually delete it from node_modules and npm install again


Reply to this email directly or view it on GitHub:
https://github.com/inaes-tic/mbc-mosto/pull/29/files#r3682861

@jmrunge
Member
jmrunge commented Apr 5, 2013

Ok, reviewed both. Please Tom look at my comments on both, fix/respond and
re pull.

Thanks!

2013/4/5 Niv Sardi notifications@github.com

this depends on #28

On 5 April 2013 15:07, Tomas Neme notifications@github.com wrote:

depends on #28


You can merge this Pull Request by running

git pull https://github.com/inaes-tic/mbc-mosto Lacrymology/mbc-common

Or view, comment on, or merge it at:

#29

Commit Summary

add mongo-driver file
add backups to gitignore
driver skeleton
basic requirements and simple methods
TEMPORARY db setup
load db collections
read playlists from DB function prototype
search scheds that overlap with the timeframe now-config.load_time
find the playlist referenced by the sched in the database, and turn it
into
a Playlist object
create the Media and Playlist objects, and call the defined callback
don't need to pass the list as a parameter
subscribe to mubsub channel and update playlists
add new requirements
add the new driver
use the mongo driver in mosto
use occurrence id as playlist name (unique)
make sure _id is an ObjectId before changing it to hex string
separate C[R]UD message callbacks
move playlist driver choice to config file
Merge remote-tracking branch 'origin/master' into
Lacrymology/playlists/mongo-driver
add the option to pass config JSON objects to drivers
Merge branch 'master' into Lacrymology/playlists/mongo-driver
add mbc-common requirement
use mbc-common.db instead of our local script
remove local db init script

File Changes

M .gitignore (1)
M config.json (2)
A drivers/playlists/conf/mongo-driver.json (3)
A drivers/playlists/mongo-driver.js (100)
M drivers/playlists/playlists-driver.js (13)
M mosto.js (5)
M package.json (6)

Patch Links:

https://github.com/inaes-tic/mbc-mosto/pull/29.patch
https://github.com/inaes-tic/mbc-mosto/pull/29.diff

Niv Sardi


Reply to this email directly or view it on GitHubhttps://github.com/inaes-tic/mbc-mosto/pull/29#issuecomment-15976972
.

@jmrunge jmrunge merged commit 44f16cd into master Apr 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment