[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/icecream-make-it-cool/services
From: Dirk Mueller <mueller () kde ! org>
Date: 2008-02-09 0:08:00
Message-ID: 1202515680.100685.28718.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 772541 by mueller:
code cleanup. doesn't actually fix anything but makes it more readable and less surprising
M +2 -0 comm.h
M +15 -16 scheduler.cpp
--- branches/work/icecream-make-it-cool/services/comm.h #772540:772541
@@ -42,6 +42,8 @@
#define MAX_SCHEDULER_PONG 3
// MAX_SCHEDULER_PING must be multiple of MAX_SCHEDULER_PONG
#define MAX_SCHEDULER_PING 12 * MAX_SCHEDULER_PONG
+// maximum amount of time in seconds a daemon can be busy installing
+#define MAX_BUSY_INSTALLING 120
#define IS_PROTOCOL_22( c ) ( (c)->protocol >= 22 )
#define IS_PROTOCOL_23( c ) ( (c)->protocol >= 23 )
--- branches/work/icecream-make-it-cool/services/scheduler.cpp #772540:772541
@@ -780,17 +780,7 @@
continue;
}
- /* Servers that are already compiling jobs but got no environments
- are currently installing new environments - ignore so far */
- if ( cs->joblist.size() != 0 && cs->compiler_versions.size() == 0 )
- {
-#if DEBUG_SCHEDULER > 0
- trace() << cs->nodename << " is currently installing\n";
-#endif
- continue;
- }
-
- // incompatible architecture
+ // incompatible architecture or busy installing
if ( !can_install( cs, job ).size() )
{
#if DEBUG_SCHEDULER > 2
@@ -930,6 +920,16 @@
for (it = css.begin(); it != css.end(); )
{
+ if ((*it)->busy_installing && (now - (*it)->busy_installing >=
+ MAX_BUSY_INSTALLING))
+ {
+ trace() << "busy installing for a long time - removing " << ( *it )->nodename << endl;
+ CS *old = *it;
+ ++it;
+ handle_end (old, 0);
+ continue;
+ }
+
/* protocol version 27 and newer use TCP keepalive */
if (IS_PROTOCOL_27(*it)) {
++it;
@@ -1079,11 +1079,10 @@
trace() << "put " << job->id << " in joblist of " << cs->nodename << endl;
#endif
cs->joblist.push_back( job );
- if ( !gotit ) // if we made the environment transfer, don't rely on the list
- {
- cs->compiler_versions.clear();
- cs->busy_installing = time(0);
- }
+ /* if it doesn't have the environment, it will get it. */
+ if ( !gotit )
+ cs->busy_installing = time(0);
+
string env;
if ( !job->master_job_for.empty() )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic