package TaskManager::Constants;

use strict;
use warnings;

use constant TM_STATUS_NEW	=> 0;
use constant TM_STATUS_LOCK	=> 5;
use constant TM_STATUS_WORK	=> 10;
use constant TM_STATUS_DONE	=> 20;
use constant TM_STATUS_FAIL	=> 30;

use constant TM_SERVER_LIMIT_TYPE_LOADAVG => 'loadavg';
use constant TM_SERVER_LIMIT_TYPE_TASKNUM => 'tasknum';

use constant TM_SERVER_STATUS_ACTIVE => 'active';
use constant TM_PROJECT_STATUS_ACTIVE => 'active';
use constant TM_TASK_STATUS_ACTIVE => 'active';

use constant TM_MAX_TOTAL_CHILD => 32;

## XXX: dirty, but quickly
our $CFG;

our @ISA = qw(Exporter);
our @EXPORT = qw(
	TM_STATUS_NEW
	TM_STATUS_LOCK
	TM_STATUS_WORK
	TM_STATUS_DONE
	TM_STATUS_FAIL
	TM_SERVER_LIMIT_TYPE_LOADAVG TM_SERVER_LIMIT_TYPE_TASKNUM
	TM_SERVER_STATUS_ACTIVE TM_PROJECT_STATUS_ACTIVE TM_TASK_STATUS_ACTIVE
	TM_MAX_TOTAL_CHILD
	$CFG
);


1;
