-->

Episodio 0022 – Google Checkout

Descarga el Episodio #0022

Vota por Nosotros

wedoit4you.com #1 en busqueda de iTunes por la palabra 'venezuela'

Esta semana salimos temprano nuevamente ya que no tuvimos que esperar por Kakei que se le dañó el disco duro (mentira kakei). Hablando en serio, salimos temprano porque las noticias mas recientes no pueden esperar llegar a tus sentidos, Google esta semana lanzo su sistema de compras en linea, Google Checkout, averigua mas al respecto.

Tambien en este episodio, introducimos una nueva seccion EDITORIAL de prueba, en la cual hablamos del porque hacemos podcasting y porque lo consideramos importante.

Esto y mas en el podcast de wedoit4you.com

Recuerda votar por nosotros y cuentale a todos tus amigos de este podcast si te gusta, tampoco dudes en ESCRIBIRNOS a:

wedoit4you@gmail.com


3 Comments »

RSS feed for comments on this post. TrackBack URI

Leave a comment

Direccion de Trackback Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License.

DIGGeanos


Episodio 0021 – Que mas quiere Microsoft?

Descarga el Episodio #021

Con la música de…

  • Daddy Yankee
  • Tego Calderon
  • Los Amigos Invisibles
  • …en este episodio hablamos de:

    Descarga este video a tu disco duro
    (Para Quicktime o VLC con codec de Quicktime)

    Actualizaciones a wedoit4you.com

    Saludos

    Saludos a Emerson de VidaTech!, a Javier del podcast viajerodelmundo.com

    ESTE PODCAST SE ESCUCHA Y SE VE MEJOR EN IPOD VIDEO, IPOD NANO, ITUNES, VLC y XINE


    5 Comments »

    RSS feed for comments on this post. TrackBack URI

    Leave a comment

    Direccion de Trackback Creative Commons License
    This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License.

    DIGGeanos


    Y ya viene el podcast!

    Estamos viendo el partido Argentina/Mexico

    Mientras estamos con la laptop en frente del TV preparando la preproduccion del episodio.

    Nuestras disculpas a la caida del servicio anoche y durante tempranas horas de la manana, pero tuvimos graves complicaciones en el servidor.

    Gracias a Latati.com encontramos algunas fallas, y aprovechamos el dia de hoy, durante el partido Alemania/Suecia a hacer un parche mayor en el manejo de conexiones a la BD de SnowRSS.

    Para los geeks, aqui esta el parche.

    Index: snowrss.py
    ===================================================================
    --- snowrss.py  (revision 20677)
    +++ snowrss.py  (working copy)
    @@ -1,4 +1,5 @@
     import MySQLdb
    +from MySQLdb import MySQLError
     from snowrss_config import getDBCon
     import feedparser,sys,os,time
     from threading import Thread
    @@ -15,16 +16,15 @@
         '''
         def __init__(self,props,cursor):
             self.properties = props
    -        con = getDBCon()
    -        self.cursor = con.cursor(MySQLdb.cursors.DictCursor)
    +        self.cursor = cursor 
    
         def setBlogId(self,id=None):
             self.blog_id = id
    
         def __reconnect(self):
             """Reconnects to the database"""
    -        self.con = getDBCon()
    -        self.cursor = self.con.cursor(MySQLdb.cursors.DictCursor)
    +        self.con.ping() # = getDBCon()
    +        #self.cursor = self.con.cursor(MySQLdb.cursors.DictCursor)
    
         def save(self):
             sql = 'insert into BLOG_POSTS '
    @@ -50,9 +50,9 @@
                     print "RECONNECTING"
                     print
    
    -    def wasUpdated(ignoreme,post_link,post_timestamp):
    +    def wasUpdated(ignoreme,cursor,post_link,post_timestamp):
             '''Returns true if the post identified by the post_link has an older ti
    mestamp than the given one.'''
    -        cursor = getDBCon().cursor()
    +
             sql='select BP_timestamp < %d as was_updated from BLOG_POSTS ' + \
                 'where BP_link=\'%s\''
    
    @@ -60,6 +60,7 @@
                          post_link.replace("'",""").encode('utf8'))
    
             try:
    +           cursor.connection.ping()
                cursor.execute(sql)
             except MySQLdb.Error, e:
                 print "Error %d: %s" % (e.args[0],e.args[1])
    @@ -92,9 +93,9 @@
             return True
         delete = classmethod(delete)
    
    -    def exists(ignoreme,post_link,post_title=None):
    +    def exists(ignoreme,cursor,post_link,post_title=None):
             '''Returns true if the post exists already in the DB'''
    -        cursor = getDBCon().cursor()
    +        #cursor = getDBCon().cursor()
             sql='select count(*) as posted_before from BLOG_POSTS ' + \
                 'where BP_link=\'%s\''
    
    @@ -103,17 +104,11 @@
    
             sql = sql % (post_link.encode('utf8'))
    
    -        #cursor.execute('SET character_set_results="utf8"')
    -        try:
    -           cursor.execute(sql)
    -        except MySQLdb.Error, e:
    -            print "Post.exists() Error %d: %s" % (e.args[0],e.args[1])
    -            print sql
    -            sys.exit()
    -
    +        cursor.connection.ping()
    +        r = cursor.execute(sql)
             data = cursor.fetchone()
    
    -        if data['posted_before'] >= 1:
    +        if int(data['posted_before']) > 1:
                 #If there are many repetitions, delete all but one.
                 appearances = int(data['posted_before'])
                 sql = "DELETE FROM BLOG_POSTS WHERE BP_link = '%s' LIMIT %s" % (pos
    t_link,
    @@ -123,6 +118,7 @@
                 print detail
    
                 try:
    +                cursor.connection.ping()
                     cursor.execute(sql)
                 except MySQLdb.Error, e:
                     print "Post.exists() Error cleaning posts [%s] - %d: %s" % (pos
    t_link,
    @@ -133,7 +129,7 @@
                 return True
    
    -        if data['posted_before'] >= 1:
    +        if int(data['posted_before']) >= 1:
                 return True
             return False
         exists = classmethod(exists)
    @@ -143,7 +139,7 @@
    
     class Blog:
    -    def __init__(self,props=None):
    +    def __init__(self,con,props=None):
             '''Receives a dictionary
             id:
             blog_name:
    @@ -156,9 +152,27 @@
             blog_fetch_interval:
             blog_last_fetch:'''
             self.props = props
    -        self.con = getDBCon()
    -        self.cursor = self.con.cursor(MySQLdb.cursors.DictCursor)
    
    +        if self.props == None:
    +            self.props = {}
    +
    +        self.setConnection(con)
    +        self.setRunsAsThread(False)
    +
    +    def setConnection(self, con):
    +        self.con = con
    +        self.setCursor(self.con.cursor(MySQLdb.cursors.DictCursor))
    +
    +    def setRunsAsThread(self, isThread=True):
    +        '''To determine if this Blog will fetch its posts on a separate thread
    or not'''
    +        self.props['is_thread'] = isThread
    +
    +    def runsAsThread(self):
    +        return self.props['is_thread']
    +
    +    def setCursor(self, cursor):
    +        self.cursor = cursor
    +
         def __str__(self):
             return str(self.props['id']) + ' - ' + self.props['blog_name']
    
    @@ -432,17 +446,18 @@
             cursor.execute(sql)
             result_set = cursor.fetchall()
             for row in result_set:
    -           blogs.append(Blog({'id':row['Blog_pk_id'],
    -                         'blog_name':row['Blog_name'],
    -                         'blog_rss_url':row['Blog_rss_url'],
    -                         'blog_url':row['Blog_url'],
    -                         'blog_author_name':row['Blog_author_name'],
    -                         'blog_author_pic':row['Blog_author_pic'],
    -                         'blog_email':row['Blog_email'],
    -                         'blog_fetch_interval':row['Blog_fetch_interval'],
    -                         'blog_last_attempt':row['Blog_last_attempt'],
    -                         'blog_last_fetch':row['Blog_last_fetch'],
    -                         'blog_active':'1'}))
    +           blogs.append(Blog(con,
    +                             {'id':row['Blog_pk_id'],
    +                              'blog_name':row['Blog_name'],
    +                              'blog_rss_url':row['Blog_rss_url'],
    +                              'blog_url':row['Blog_url'],
    +                              'blog_author_name':row['Blog_author_name'],
    +                              'blog_author_pic':row['Blog_author_pic'],
    +                              'blog_email':row['Blog_email'],
    +                              'blog_fetch_interval':row['Blog_fetch_interval'],
    +                              'blog_last_attempt':row['Blog_last_attempt'],
    +                              'blog_last_fetch':row['Blog_last_fetch'],
    +                              'blog_active':'1'}))
    
             return blogs
    
    @@ -454,28 +469,28 @@
             sql = 'update BLOGS set Blog_last_fetch=%d  where Blog_pk_id=%d ;' % (i
    nt(time.time()), int(self.props['id']))
    
             try:
    +            self.cursor.connection.ping()
                 self.cursor.execute(sql)
             except Exception, e:
                 print
                 print e
                 print 'Blog.updateLastFetch(): ' + sql
    -            print "RECONNECTING"
    -            self.__reconnect()
    -            self.updateLastFetch()
    
         def updateLastAttempt(self):
             '''updates the last attempt-to-fetch timestamp for this blog'''
             sql = 'update BLOGS set Blog_last_attempt=%d  where Blog_pk_id=%d ;' %
    (int(time.time()), int(self.props['id']))
    
             try:
    +            self.cursor.connection.ping()
                 self.cursor.execute(sql)
    -        except Exception, e:
    +        except MySQLError, e:
                 print
                 print e
                 print 'Blog.updateLastAttempt(): ' + sql
    -            print "RECONNECTING"
    -            self.__reconnect()
    -            self.updateLastAttempt()
    +            print self.cursor
    +            print "Try again"
    +            #self.__reconnect()
    +            #self.updateLastAttempt()
    
         def setLastFetch(self, time):
    @@ -520,13 +535,13 @@
                                                                 self.props['blog_na
    me'])
    
    -
         def getPosts(self):
             '''Returns all the post objects'''
             sql = 'SELECT * FROM BLOG_POSTS WHERE BP_fk_blog_id = %d;'
             sql = sql % (self.props['id'])
    
             try:
    +            self.cursor.connection.ping()
                 self.cursor.execute(sql)
             except MySQLdb.Error, e:
                 print "Blog.getPosts() Error: %d: %s" % (e.args[0],e.args[1])
    @@ -552,17 +567,14 @@
             return result_posts
    
         def fetchPosts(self):
    -    #Fetches the posts for this blog, will only save those
    -    #it hasn't saved already
    +        '''Fetches the posts for this blog,
    +        will only save those it hasnt saved already'''
    
             if self.isReadyToFetch() == False:
                 now = int(time.time()) #added this variables for clarity...
                 next_scheduled_fetch_attempt = self.props['blog_last_attempt'] + se
    lf.props['blog_fetch_interval']
                 secondsTillNextAttempt = next_scheduled_fetch_attempt - now
    
    -            #if now > next_scheduled_fetch:
    -            #    secondsTillNextAttempt = now - next_scheduled_fetch
    -
                 print '%s not ready yet. Next fetch attempt in %d seconds' % (self.
    props['blog_name'],secondsTillNextAttempt)
    
             if self.props['blog_active'] == '1' and self.isReadyToFetch():
    @@ -615,7 +627,7 @@
    
                     #we check if the post exists already in the db
                     #if not, we insert it.
    -                if Post.exists(post_link) == False:
    +                if Post.exists(self.cursor,post_link) == False:
                         print 'New Fetch on %s [%s]' % (self.props['blog_name'],pos
    t_title)
                         post = Post({'blog_id':self.props['id'],
                                  'post_title':post_title,
    @@ -628,7 +640,7 @@
                         post.save()
                         self.updateLastFetch()
                         #we insert the post
    -                elif Post.wasUpdated(post_link,post_timestamp):
    +                elif Post.wasUpdated(self.cursor,post_link,post_timestamp):
                         print 'Deleting old posts about [%s]' % post_link
                         Post.delete(post_link)
                         print 'Updated post on %s [%s]' % (self.props['blog_name'],
    post_title)
    @@ -642,9 +654,13 @@
                                  self.cursor)
                         post.save()
                         self.updateLastFetch()
    +
    +                #if it runs on a thread close the connection.
    +                if self.runsAsThread():
    +                    self.cursor.connection.close()
    +                    self.cursor.connection = None
    +                    self.cursor = None
    
    -                #If it existed but the date isn't the same
    -            self.con.close()
    
     class LanguageValidator:
         '''A Class to validate language codes against the language codes stored in
    the database'''
    @@ -719,6 +735,10 @@
    
     #import the file with the description of the blogs
     #from snowrss_config import blogs
    +
    +con = getDBCon()
    +cursor = con.cursor(MySQLdb.cursors.DictCursor)
    +
     if __name__=='__main__':
         #it could be the case where the user wants to fetch only from one blog
         #so we check the input, if there's an int, that's the blog id.
    @@ -728,7 +748,7 @@
             """Load the blogs by the ids received"""
             for id in sys.argv[1:]:
                 try:
    -                tempBlog = Blog()
    +                tempBlog = Blog(con)
                     tempBlog.load(int(id))
                     #force them to be fetch, forget about next time to fetch
                     tempBlog.setLastAttempt(0)
    @@ -739,14 +759,26 @@
                     pass
         else:
             """Load all blogs"""
    -        blogs = Blog.getBlogs(getDBCon())
    +        blogs = Blog.getBlogs(con)
    +        con.close()
    
         print "SnowRSS is ready to scan %d feeds" % len(blogs)
    
         max_threads = 5
         threads = []
    +
         for blog in blogs:
    +# LINEAL FETCHING
    +#        con2 = getDBCon()
    +#        blog.setConnection(con2)
    +#        con2 = getDBCon()
    +#        blog.setConnection(con2)
    +#        blog.fetchPosts()
    +#        con2.close()
    +#        con2 = None
    +
    +
    +#PARALLEL FETCHING
             if (len(threads) < max_threads):
    +            blog.setConnection(getDBCon())
    +            blog.setRunsAsThread(True)
                 blog_thread = Thread(target=blog.fetchPosts)
                 blog_thread.start()
                 threads.append(blog_thread)
    @@ -756,8 +788,5 @@
                         t.join()
                         threads.remove(threads[0])
                         if len(threads) > ((max_threads/2) + 1):
    -                        #print "We can continue without waiting now"
    +                       #print "We can continue without waiting now"
                             break
    -
    -
    -    #blog.fetchPosts() #linear
    

    (El papa de los parches hasta ahora para SnowRSS, habia mucha basura, ahora esta corriendo como una sedita.)

    Han habido otros reparos a la pagina, y como habran visto esta semana la pagina ya esta utilizando el nuevo logo, cortesia de Hugo Londoño de QTPD.com (Muchas Gracias Hugo! Hemos recibido cantidad de comentarios positivos con este nuevo logo de wedoit4you.com)

    En fin, los dejamos, estaremos grabando en aproximadamente 100 minutos, y unas 2 horas mas tarde esperaremos tener el proximo episodio #0021 del podcast de wedoit4you.com


    No Comments yet »

    RSS feed for comments on this post. TrackBack URI

    Leave a comment

    Direccion de Trackback Creative Commons License
    This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License.

    DIGGeanos


    Episodio 0020 – Hasta luego Bill

    Descarga el Mp4


    Wow, que noticia tan cargada de semana, digo, que semana tan cargada de noticias!!!

    Llegamos al episodio 20, y estamos super cargados de emocion y energias positivas para traerte lo ultimo en noticias de tecnologia esta semana del 11 de Junio hasta hoy 17 de Junio.

    En este episodio:

    Nuevos Blogs esta semana:

    • Votaguz.com (Desde Bogota, Colombia, Posicion 35, 155 visitas y 41 posts)
    • LaTati.com (Desde Miami, Florida, Posicion 71, 11 visitas y 5 posts)
    • TecnoBlog (Desde Chile, Posicion 66, 17 visitas, 12 posts)

    Musica para este episodio:
    Natasha Bedingfield – Unwritten


    4 Comments »

    RSS feed for comments on this post. TrackBack URI

    Leave a comment

    Direccion de Trackback Creative Commons License
    This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License.

    DIGGeanos


    logo

    Powered by the Enlightened theme for Wordpress.