[Systers-dev] Biweekly Status Update

Malveeka Tewari malveeka at gmail.com
Sun Jun 28 14:07:36 PDT 2009


Hi Jennifer,

I spent the last two weeks learning a lot of new things and a lot of
debugging.
I still don't have the final working code but I hope to reach there before
the midterm evaluations.

*I took tutorials for PostgreSql and Storm ORM.*
With Storm ORM I faced a problem in using postgresql as the database
manager.. ON choosing Postgresql as the database scheme, I kept getting the
following error:

File "storm/store.py", line 73, in __init__
    self._connection = database.connect(self._event)
  File "storm/database.py", line 367, in connect
    return self.connection_factory(self, event)
  File "storm/database.py", line 168, in __init__
    self._raw_connection = self._database.raw_connect()
  File "storm/databases/postgres.py", line 331, in raw_connect
    raw_connection = psycopg2.connect(self._dsn)
*psycopg2.OperationalError: could not connect to server: Connection refused*
    Is the server running on host "192.168.1.4" and accepting
    TCP/IP connections on port 5432?

I spent a lot of time trying to get Storm working with pgsql, but somehow I
could not connect to the pgsql server.
So I took the tutorial with SqLite scheme.
For using storm syntax, it doesn't make much difference in which database
scheme is being used but I would need to get storm working with postgres so
that we can use Storm for the systers database.

I also took postgresql tutorials and have finished writing the
PsqlMembershipAdaptor.py for pgsql but it doesn't seem to be working
correctly. The code executes without errors but am not able to see the
database created for new lists.
Since it was not working, I did not push the code to launchpad. However am
attaching it with this mail. To get it working few changes need to be done
to the mm_cfg.py file.
The consatants need to defined there

PGSQL_MEMBER_DB_NAME = "mailman"
PGSQL_MEMBER_DB_USER = "mailman"
PGSQL_MEMBER_DB_PASS = "pass123quot;
PGSQL_MEMBER_DB_HOST = "localhost"
PGSQL_MEMBER_TABLE_TYPE = "wide"

After creating a new list, we need to execute following commands as well:

from Mailman.PsqlMemberships import PsqlMemberships

def extend(list):
list._memberadaptor = PsqlMemberships(list)

and we should have the database for new members.

I haven't used Storm for the underlying pgsql databse (because I couldn't
get it Storm to work with posgres.
Once we get the psqladaptor working may be we can modify it to use Storm
abstraction for the underlying database.

Also, sorry for not responding to your last mail. I thought I would reply
together with the biweekly status report.
Monday at 11:30am, (your time) on irc would work for me. It'll be great to
have Andy join us. I am sure he'll be able to help me with the Storm doubts

Thanks
Malveeka


More information about the Systers-dev mailing list