Skip to content

Commit

Permalink
Merge branch 'develop' of rcbuilder.ch.internal:oss/spindle into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nevali committed Aug 11, 2017
2 parents aa980a5 + f0104a5 commit 2bbf382
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions quilt/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ char *spindle_cachepath;
SQL *spindle_db;
int spindle_s3_verbose;
long spindle_s3_fetch_limit;
int spindle_threshold;

static int spindle_cache_init_(void);
static int spindle_cache_init_s3_(const char *bucket);
Expand All @@ -50,6 +51,7 @@ quilt_plugin_init(void)
spindle_bucket = NULL;
spindle_db = NULL;
spindle_cachepath = NULL;
spindle_threshold = quilt_config_get_int(QUILT_PLUGIN_NAME ":threshold", SPINDLE_THRESHOLD);
if((t = quilt_config_geta(QUILT_PLUGIN_NAME ":db", NULL)))
{
spindle_db = sql_connect(t);
Expand Down
1 change: 1 addition & 0 deletions quilt/p_spindle.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ extern char *spindle_cachepath;
extern int spindle_s3_verbose;
extern struct index_struct spindle_indices[];
extern struct mediamatch_struct spindle_mediamatch[];
extern int spindle_threshold;

int spindle_process(QUILTREQ *request);

Expand Down
8 changes: 7 additions & 1 deletion quilt/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,15 @@ spindle_query_request(struct query_struct *dest, QUILTREQ *request, const char *
quilt_canon_set_param(request->canonical, "mode", t);
}
}
t = quilt_request_getparam(request, "score");
if(t)
{
dest->score = atoi(t);
quilt_canon_set_param(request->canonical, "score", t);
}
if(dest->score == -1)
{
dest->score = SPINDLE_THRESHOLD;
dest->score = spindle_threshold;
}
return 200;
}
Expand Down

0 comments on commit 2bbf382

Please sign in to comment.