Daemons: add usage function to project specific handler

Projects that have there own assimilator need to implement the assimilate_handler_usage() function and should printf() a description of those custom options. For examples see sample_assimilator.cpp or script_assimilator.cpp
This commit is contained in:
Christian Beer 2015-10-13 16:39:04 +02:00
parent 0038d275cd
commit dd004404a1
6 changed files with 35 additions and 0 deletions

View File

@ -35,3 +35,4 @@ extern int assimilate_handler(
);
extern int assimilate_handler_init(int argc, char** argv);
extern void assimilate_handler_usage();

View File

@ -72,6 +72,7 @@ void usage(char* name) {
" [-v | --version] Show version information\n",
name
);
assimilate_handler_usage();
}
// assimilate all WUs that need it

View File

@ -50,6 +50,14 @@ int assimilate_handler_init(int argc, char** argv) {
return 0;
}
void assimilate_handler_usage() {
// describe the project specific arguments here
//fprintf(stderr,
// " custom options:\n"
// " [--project_option X] a project specific option\n"
//);
}
int assimilate_handler(
WORKUNIT& wu, vector<RESULT>& /*results*/, RESULT& canonical_result
) {

View File

@ -36,6 +36,14 @@ int assimilate_handler_init(int argc, char** argv) {
return 0;
}
void assimilate_handler_usage() {
// describe the project specific arguments here
//fprintf(stderr,
// " custom options:\n"
// " [--project_option X] a project specific option\n"
//);
}
int assimilate_handler(
WORKUNIT& wu, vector<RESULT>& /*results*/, RESULT& canonical_result
) {

View File

@ -77,6 +77,15 @@ int assimilate_handler_init(int argc, char** argv) {
return 0;
}
void assimilate_handler_usage() {
// describe the project specific arguments here
fprintf(stderr,
" custom options:\n"
" --script \"X\" call script to assimilate job\n"
" see comment in script_assimilator.cpp for details\n"
);
}
int assimilate_handler(
WORKUNIT& wu, vector<RESULT>& /*results*/, RESULT& canonical_result
) {

View File

@ -44,6 +44,14 @@ int assimilate_handler_init(int argc, char** argv) {
return 0;
}
void assimilate_handler_usage() {
// describe the project specific arguments here
//fprintf(stderr,
// " custom options:\n"
// " [--project_option X] a project specific option\n"
//);
}
int assimilate_handler(
WORKUNIT& wu, vector<RESULT>& /*results*/, RESULT& canonical_result
) {