[galaxy-dev] galaxy login session query
Hi everyone, I am new to Galaxy and I have a specific requirement regarding the user session. When a user logs in to galaxy his session dose not expire until he logs out. I want that when a user logs in his session automatically expires in 3 days and he will be asked to login again. Can anyone suggest how or where this can be done. Regards Harendra ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] galaxy login session query
Hi, Thanks a lot Mr.Lazarus, this solution worked out. I have one more (last) query related to sessions. When a user logs out from galaxy and in the next page uses the back button, the user session doesn't expire. The user can't see the previously saved history but it shows that the user is still logged in. Can anyone or Mr.Lazarus can suggest how this problem can be solved. Regards Harendra On Sun, May 15, 2011 at 10:42 PM, Ross wrote: > Harendra, > > Welcome to Galaxy! > > As far as I know, there's currently no parameter in universe_wsgi.ini other > than the cookie path but in > [galaxyroot]/lib/galaxy/web/framework/__init__.py you might be able to > change the default from 90 days - I have NOT tested this so YMMV. All the > calls to set_cookie I found appear to rely on the default age... > > def set_cookie( self, value, name='galaxysession', path='/', age=90, > version='1' ): > """Convenience method for setting a session cookie""" > # The galaxysession cookie value must be a high entropy 128 bit > random number encrypted > # using a server secret key. Any other value is invalid and could > pose security issues. > self.response.cookies[name] = value > self.response.cookies[name]['path'] = path > self.response.cookies[name]['max-age'] = 3600 * 24 * age # 90 days > tstamp = time.localtime ( time.time() + 3600 * 24 * age ) > > self.response.cookies[name]['expires'] = time.strftime( '%a, > %d-%b-%Y %H:%M:%S GMT', tstamp ) > self.response.cookies[name]['version'] = version > > > On Sun, May 15, 2011 at 12:44 PM, Harendra chawla < > chawla.haren...@gmail.com> wrote: > >> Hi everyone, >> >> I am new to Galaxy and I have a specific requirement regarding the user >> session. When a user logs in to galaxy his session dose not expire until he >> logs out. I want that when a user logs in his session automatically expires >> in 3 days and he will be asked to login again. >> Can anyone suggest how or where this can be done. >> >> Regards >> Harendra >> >> ___ >> Please keep all replies on the list by using "reply all" >> in your mail client. To manage your subscriptions to this >> and other Galaxy lists, please use the interface at: >> >> http://lists.bx.psu.edu/ >> > > > > -- > Ross Lazarus MBBS MPH; > Associate Professor, Harvard Medical School; > Director of Bioinformatics, Channing Lab; Tel: +1 617 505 4850; > Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444; > ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
[galaxy-dev] Database query
Hi everyone, I have a specific requirement in which I have changed the schema of one table in the database but I am not able find out the way to add the data into the table. Can anyone suggest where and how can i add or modify the data in the table. For example there is a table named galaxy_user, if I will add an extra column into that table then how and where can i add the data for that column?? Regards Harendra ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] Database query
Hi, Thanks a lot for the suggestion, I will try to convince my boss considering the issues stated by both of you. And thanks Nate for the syntax to add data. Regards Harendra On Fri, May 20, 2011 at 9:09 AM, Nate Coraor wrote: > Hi Harenda, > > I'll repeat what Hans has said - depending on what you're doing, this > could cause issues. Depending on what you're doing, you may want to > look at our user template functionality, if you're storing extra data > about users. > > If it's best to use an extra column on the user table, you should be > able to access that column by getting a user object in the interface and > accessing the column as an attribute on the object: > > user = sa_session.query( galaxy.model.User ).get( ) > user.new_column = value > sa_session.add( user ) > sa_session.flush() > > --nate > > Hans-Rudolf Hotz wrote: > > Hi Harendra > > > > Be very careful when you 'mess' with the database! And I would > > definitively refrain from changing the database schema, as this > > might very well cause problems in the future when you need to > > upgrade the schema as part of a Galaxy code update. > > > > If you really need a changed 'galaxy_user' table, I suggest to set > > up a second database with a copy of this table and change it there. > > And when ever you need to access the extra column, connect to the > > other database. > > > > > > Anyway, your actual question was "how to add or modify data in a table?" > > > > I am confused: you know the syntax for changing the schema of a > > table, but you don't know the syntax for manipulating the data of a > > table? > > > > > > You don't say, whether you are using PostgreSQL or MySQL, in case of > > MySQL, I recommend to read: > > > > http://dev.mysql.com/doc/refman/5.1/en/update.html > > http://dev.mysql.com/doc/refman/5.1/en/insert.html > > > > > > Regards, Hans > > > > > > > > On 05/20/2011 08:18 AM, Harendra chawla wrote: > > >Hi everyone, > > > > > >I have a specific requirement in which I have changed the schema of one > > >table in the database but I am not able find out the way to add the data > > >into the table. > > >Can anyone suggest where and how can i add or modify the data in the > table. > > >For example there is a table named galaxy_user, if I will add an extra > > >column into that table then how and where can i add the data for that > > >column?? > > > > > >Regards > > >Harendra > > > > > > > > > > > > > > >___ > > >Please keep all replies on the list by using "reply all" > > >in your mail client. To manage your subscriptions to this > > >and other Galaxy lists, please use the interface at: > > > > > > http://lists.bx.psu.edu/ > > ___ > > Please keep all replies on the list by using "reply all" > > in your mail client. To manage your subscriptions to this > > and other Galaxy lists, please use the interface at: > > > > http://lists.bx.psu.edu/ > ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
[galaxy-dev] database table HistoryDatasetAssociation
Hi, I am trying to modify the history_datset_association table in the database by adding one column, as per my requirement. I have changed the schema of the table but not able to add data for that column. Can anyone suggest how and where it can be done. Regards Harendra ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
[galaxy-dev] recovery: galaxy restart
Hi everyone, I am trying to modify the *recover* function from the drmaa.py (/galaxy_central/lib/galaxy/job/runners/drmaa.py) as per my requirements. But I am not ale to understand the flow of that function. The recover function is called when the galaxy server is restarted. It first looks for the running jobs from the database. Then my problem is how it regains the same old state of the galaxy (specially the GUI) which was before the galaxy got restarted. Can anyone explain me the flow of the recover function and how the old state is regained. Regards Harendra ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] recovery: galaxy restart
Hi Nate, I got your point but which part of the code is doing all these things, I mean how exactly this is done. Is it using any other function apart from recover? Regards Harendra On Wed, Jun 1, 2011 at 8:56 AM, Nate Coraor wrote: > Harendra chawla wrote: > > Hi everyone, > > > > I am trying to modify the *recover* function from the drmaa.py > > (/galaxy_central/lib/galaxy/job/runners/drmaa.py) as per my requirements. > > But I am not ale to understand the flow of that function. > > > > The recover function is called when the galaxy server is restarted. It > first > > looks for the running jobs from the database. Then my problem is how it > > regains the same old state of the galaxy (specially the GUI) which was > > before the galaxy got restarted. > > Can anyone explain me the flow of the recover function and how the old > state > > is regained. > > Hi Harendra, > > I'm not sure I understand what you mean by old state and the GUI - all > that's really necessary here is to determine what Galaxy considers to be > the state of the job (new, queued, running), recreate the in-memory job > components (the JobWrapper), and place the job back in Galaxy's > DRM-monitoring queue, which will then proceed with the process of > finishing the job if it's finished in the DRM or waiting for it to > finish if it's still queued or running in the DRM. > > --nate > > > > > Regards > > Harendra > > > ___ > > Please keep all replies on the list by using "reply all" > > in your mail client. To manage your subscriptions to this > > and other Galaxy lists, please use the interface at: > > > > http://lists.bx.psu.edu/ > > ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] recovery: galaxy restart
Hi Nate, Ya I have seen the function __check_jobs_at_startup(), it calls the recover function after checking the state of the job from the database and updating the jobWrapper. But what it does after calling the recover function and one more thing, does it use the monitor() and the check_watched_item() in the drmaa.py. Thanks Harendra On Wed, Jun 1, 2011 at 9:10 PM, Nate Coraor wrote: > Harendra chawla wrote: > > Hi Nate, > > > > I got your point but which part of the code is doing all these things, I > > mean how exactly this is done. > > Is it using any other function apart from recover? > > Yes, see __check_jobs_at_startup() in lib/galaxy/jobs/__init__.py > > --nate > > > > > Regards > > Harendra > > > > On Wed, Jun 1, 2011 at 8:56 AM, Nate Coraor wrote: > > > > > Harendra chawla wrote: > > > > Hi everyone, > > > > > > > > I am trying to modify the *recover* function from the drmaa.py > > > > (/galaxy_central/lib/galaxy/job/runners/drmaa.py) as per my > requirements. > > > > But I am not ale to understand the flow of that function. > > > > > > > > The recover function is called when the galaxy server is restarted. > It > > > first > > > > looks for the running jobs from the database. Then my problem is how > it > > > > regains the same old state of the galaxy (specially the GUI) which > was > > > > before the galaxy got restarted. > > > > Can anyone explain me the flow of the recover function and how the > old > > > state > > > > is regained. > > > > > > Hi Harendra, > > > > > > I'm not sure I understand what you mean by old state and the GUI - all > > > that's really necessary here is to determine what Galaxy considers to > be > > > the state of the job (new, queued, running), recreate the in-memory job > > > components (the JobWrapper), and place the job back in Galaxy's > > > DRM-monitoring queue, which will then proceed with the process of > > > finishing the job if it's finished in the DRM or waiting for it to > > > finish if it's still queued or running in the DRM. > > > > > > --nate > > > > > > > > > > > Regards > > > > Harendra > > > > > > > ___ > > > > Please keep all replies on the list by using "reply all" > > > > in your mail client. To manage your subscriptions to this > > > > and other Galaxy lists, please use the interface at: > > > > > > > > http://lists.bx.psu.edu/ > > > > > > > ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
Re: [galaxy-dev] recovery: galaxy restart
Hi Nate, I have used the local.py logic for submission of my jobs, for a grid based architecture. But local.py does not have the recover() function so I was trying to use the concept of recover() from other modules. My job submission also uses the drmaa api's, so I thought of using the drmaa.py module. Moreover the local.py doesn't have the monitor() or check_watched_items() functions which means it doesn't use the concept of monitor_queue. So how can I create a recover() function in such a case. Can you suggest anything regarding this issue. Thanks Harendra On Wed, Jun 1, 2011 at 10:52 PM, Nate Coraor wrote: > Harendra chawla wrote: > > Hi Nate, > > > > Ya I have seen the function __check_jobs_at_startup(), it calls the > recover > > function after checking the state of the job from the database and > updating > > the jobWrapper. But what it does after calling the recover function and > one > > more thing, does it use the monitor() and the check_watched_item() in the > > drmaa.py. > > Yes, notice that the last function of the recover() method is to insert > the job state object into the DRM monitor queue with: > > self.monitor_queue.put( drm_job_state ) > > Which is the same as the final step of the submission process, the > queue_job() method. Once this happens, the monitor thread will pick up > the job state from monitor_queue (a Python Queue instance) and monitor > it with monitor()/check_watched_items(). > > --nate > > > > > Thanks > > Harendra > > > > On Wed, Jun 1, 2011 at 9:10 PM, Nate Coraor wrote: > > > > > Harendra chawla wrote: > > > > Hi Nate, > > > > > > > > I got your point but which part of the code is doing all these > things, I > > > > mean how exactly this is done. > > > > Is it using any other function apart from recover? > > > > > > Yes, see __check_jobs_at_startup() in lib/galaxy/jobs/__init__.py > > > > > > --nate > > > > > > > > > > > Regards > > > > Harendra > > > > > > > > On Wed, Jun 1, 2011 at 8:56 AM, Nate Coraor wrote: > > > > > > > > > Harendra chawla wrote: > > > > > > Hi everyone, > > > > > > > > > > > > I am trying to modify the *recover* function from the drmaa.py > > > > > > (/galaxy_central/lib/galaxy/job/runners/drmaa.py) as per my > > > requirements. > > > > > > But I am not ale to understand the flow of that function. > > > > > > > > > > > > The recover function is called when the galaxy server is > restarted. > > > It > > > > > first > > > > > > looks for the running jobs from the database. Then my problem is > how > > > it > > > > > > regains the same old state of the galaxy (specially the GUI) > which > > > was > > > > > > before the galaxy got restarted. > > > > > > Can anyone explain me the flow of the recover function and how > the > > > old > > > > > state > > > > > > is regained. > > > > > > > > > > Hi Harendra, > > > > > > > > > > I'm not sure I understand what you mean by old state and the GUI - > all > > > > > that's really necessary here is to determine what Galaxy considers > to > > > be > > > > > the state of the job (new, queued, running), recreate the in-memory > job > > > > > components (the JobWrapper), and place the job back in Galaxy's > > > > > DRM-monitoring queue, which will then proceed with the process of > > > > > finishing the job if it's finished in the DRM or waiting for it to > > > > > finish if it's still queued or running in the DRM. > > > > > > > > > > --nate > > > > > > > > > > > > > > > > > Regards > > > > > > Harendra > > > > > > > > > > > ___ > > > > > > Please keep all replies on the list by using "reply all" > > > > > > in your mail client. To manage your subscriptions to this > > > > > > and other Galaxy lists, please use the interface at: > > > > > > > > > > > > http://lists.bx.psu.edu/ > > > > > > > > > > > > > > ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
[galaxy-dev] sqlite to postgres
Hi, I want to convert my database from sqlite to postgres. I am able to do it as far as schema is concerned, but I want to preserve the data as well. When I changed the database to postgres, all my history got lost. Is there any way I can preserve the data in sqlite database while converting to postgres. Regards Harendra ___ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/