Hi!
I'm trying to do a plugin to search for tickets in all my trac
environments, like query, but in all environments.
My first thought was to use the query code, but searching in all databases.
Today I have 156 separated trac environments, all enviroments are in
the same directory (/home/trac/).
I was trying to do this search with the following code, but I'm
heaving ''[Errno 24] Too many open files'' all the time.
The code:
<code>
# Check tickets from others projects
environment_path = self.config.get("multitickets", "environment_path")
environment_list = os.listdir(environment_path)
environment_list.sort()
for env_name in environment_list:
environment = Environment(os.path.join(environment_path, env_name))
db = environment.get_db_cnx()
tickets = query.execute(db)
db.close()
req.hdf['query.results.%s' % env_name] = tickets
</code>
My question is just to see if someone has an idea how to code this
search without given this error, like doing - open database - search
database - close database.
Thanks a lot!
--
Ricardo Salveti
"Free software is a matter of liberty not price.
You should think of 'free' as in 'free speech' and not as 'free beer'."
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/trac-users
-~----------~----~----~----~------~----~------~--~---