2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2003-08-15 19:23:44 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2003-08-15 19:23:44 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
2002-12-03 18:57:40 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2002-12-03 18:57:40 +00:00
|
|
|
|
2003-04-07 19:06:00 +00:00
|
|
|
#include "boinc_db.h"
|
2003-08-15 19:23:44 +00:00
|
|
|
#include "sched_config.h"
|
2004-04-04 01:59:47 +00:00
|
|
|
#include "synch.h"
|
2009-08-10 04:56:46 +00:00
|
|
|
#include "sched_types.h"
|
2007-05-02 23:14:00 +00:00
|
|
|
#include "sched_shmem.h"
|
2002-08-30 22:11:36 +00:00
|
|
|
|
2006-11-05 00:15:10 +00:00
|
|
|
// various delay params.
|
|
|
|
// Any of these could be moved into SCHED_CONFIG, if projects need control.
|
|
|
|
|
|
|
|
#define DELAY_MISSING_KEY 3600
|
|
|
|
// account key missing or invalid
|
|
|
|
#define DELAY_UNACCEPTABLE_OS 3600*24
|
|
|
|
// Darwin 5.x or 6.x (E@h only)
|
|
|
|
#define DELAY_BAD_CLIENT_VERSION 3600*24
|
|
|
|
// client version < config.min_core_client_version
|
|
|
|
#define DELAY_NO_WORK_SKIP 0
|
|
|
|
// no work, config.nowork_skip is set
|
|
|
|
// Rely on the client's exponential backoff in this case
|
|
|
|
#define DELAY_PLATFORM_UNSUPPORTED 3600*24
|
|
|
|
// platform not in our DB
|
|
|
|
#define DELAY_DISK_SPACE 3600
|
|
|
|
// too little disk space or prefs (locality scheduling)
|
|
|
|
#define DELAY_DELETE_FILE 3600*4
|
|
|
|
// wait for client to delete a file (locality scheduling)
|
|
|
|
#define DELAY_ANONYMOUS 3600*4
|
|
|
|
// anonymous platform client doesn't have version
|
|
|
|
#define DELAY_NO_WORK_TEMP 0
|
|
|
|
// client asked for work but we didn't send any,
|
|
|
|
// because of a reason that could be fixed by user
|
|
|
|
// (e.g. prefs, or run BOINC more)
|
|
|
|
// Rely on the client's exponential backoff in this case
|
|
|
|
#define DELAY_NO_WORK_PERM 3600*24
|
|
|
|
// client asked for work but we didn't send any,
|
|
|
|
// because of a reason not easily changed
|
|
|
|
// (like wrong kind of computer)
|
2008-02-28 21:22:50 +00:00
|
|
|
#define DELAY_NO_WORK_CACHE 0
|
2007-05-14 15:21:38 +00:00
|
|
|
// client asked for work but we didn't send any,
|
|
|
|
// because user had too many results in cache.
|
2008-02-28 21:22:50 +00:00
|
|
|
// Rely on client's exponential backoff
|
|
|
|
#define DELAY_MAX (2*86400)
|
|
|
|
// maximum delay request
|
2006-11-05 00:15:10 +00:00
|
|
|
|
2004-09-13 18:05:54 +00:00
|
|
|
extern GUI_URLS gui_urls;
|
2006-06-26 22:58:24 +00:00
|
|
|
extern PROJECT_FILES project_files;
|
2004-04-04 01:59:47 +00:00
|
|
|
extern key_t sema_key;
|
2004-07-24 00:09:28 +00:00
|
|
|
extern int g_pid;
|
2007-05-02 23:14:00 +00:00
|
|
|
extern SCHED_SHMEM* ssp;
|
2007-07-05 04:18:48 +00:00
|
|
|
extern bool batch;
|
|
|
|
// read sequences of requests from stdin (for testing)
|
|
|
|
extern bool mark_jobs_done;
|
|
|
|
// mark jobs as successfully done immediately after send
|
|
|
|
// (for debugging/testing)
|
2009-01-10 00:43:33 +00:00
|
|
|
extern bool all_apps_use_hr;
|
2004-04-30 18:26:20 +00:00
|
|
|
|
|
|
|
extern int open_database();
|
2008-12-19 18:14:02 +00:00
|
|
|
extern void debug_sched(const char *trigger);
|