[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ganymede Help] Date Comparision

Date Tue, 7 May 2002 12:42:19 -0500
From Jonathan Abbey <jonabbey@arlut.utexas.edu>

On Tue, May 07, 2002 at 12:32:22PM -0400, Gaurav Bhargava wrote:
| Hi Jon,
| I am sorry for this late reply ....I am not running builderPhase1() by 
| myself , rather i have it scheduled to run every minute in the server. 

Aha!  Maybe that's the problem.  The builder tasks are not meant to be
run on a periodic basis.. rather, they are meant to be run on
transaction commit.

Go into the Task object for your builder task, turn off the 'Run
Periodically' checkbox, and turn on the 'Run on Transaction Commit'
checkbox.

That will make it so that the builder task is only run when something
has changed.

I wouldn't think that would have any effect on oldLastRunTime (and
looking over the code for the last 20 minutes, I don't see any way it
could), but that is a significant difference between the way you're
doing things and the way I wrote the code.

| Also i am not using Serial_number_task.oldLastRunTime anywhere else. I 
| dont know why this value always comes out to be null. Have you ever 
| used this anywhere in your code???

I use the GanymedeBuilderTask.baseChanged() method all the time, and
it depends on oldLastRunTime being set.  It works just fine.

| I have tried each and every possible combination but it always gives me 
| a null value.
| Can you test this in your box and let me know the result.

As I say, oldLastRunTime has to be set correctly, both from my reading
of the code and from baseChanged() working at all.  The only way this
would not be the case would be if the task is being replaced with a
new instance of the Serial_number_task class each time it is run,
which the Ganymede schedule should never do.

Now, if you are actually editing your Serial_number_task object in the
Ganymede database, it looks as though in that case the taskCustom
class would cause the task to be recreated whenever you commit a
transaction involving the Serial_number_task object.  Are you always
editing your database task object?

If you want me to help you solve this, you're going to have to give me
a lot more information, Gaurav.  I mean _everything_.  Start from when
you start up the server and tell me exactly the sequence of operations
you go through to see this problem.  Give me your server.log file.

If that's not enough, then I'll need to see all of your custom code to
try and figure out what it is that you're doing that is causing this
strange result.

Again, I can't read minds, and I know that you have tried to do coding
in ways that I didn't intend before.  Without knowing everything
you're doing here, I can't say for sure what's going on.

| Thanks 
| Gaurav

-- 
-------------------------------------------------------------------------------
Jonathan Abbey 				              jonabbey@arlut.utexas.edu
Applied Research Laboratories                 The University of Texas at Austin
Ganymede, a GPL'ed metadirectory for UNIX     http://www.arlut.utexas.edu/gash2

----------------------------------------------------------------------------
To make changes to your subscription to the Ganymede Help list, send
mail to majordomo@arlut.utexas.edu.

To unsubcribe, include the line

unsubscribe ganymede-help

in the body of your mail message

Visit the Ganymede web page at http://www.arlut.utexas.edu/gash2

----------------------------------------------------------------------------


  • Re: [Ganymede Help] Date Comparision
    • From: Jonathan Abbey <jonabbey@arlut.utexas.edu>