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 n...@bx.psu.edu 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 n...@bx.psu.edu 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 n...@bx.psu.edu 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] 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 n...@bx.psu.edu 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 n...@bx.psu.edu 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 n...@bx.psu.edu 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] 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 n...@bx.psu.edu 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 id ) 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/