|
@@ -211,22 +211,19 @@ class chctl
|
|
|
return "{$name}-{$spec}-{$card_type}-{$quality}";
|
|
|
}
|
|
|
|
|
|
- const feed_minorder = 1;
|
|
|
- const lowest_ratio = 0.15;
|
|
|
- const sleep_ratio = 0.05;
|
|
|
- const timeout_level = 180;
|
|
|
+ const feed_minorder = 5;
|
|
|
+ const sleep_ratio = 0.005;
|
|
|
|
|
|
const max_sleep_time = 120;
|
|
|
const sleep_count = 5;
|
|
|
|
|
|
const wakeup_commit_count = 5;
|
|
|
const sleep_commit_count = 5;
|
|
|
- const sleep_notify_count = 5;
|
|
|
+ const sleep_notify_count = 15;
|
|
|
|
|
|
const profit_count = 90;
|
|
|
const avg_order_time = 180;
|
|
|
|
|
|
-
|
|
|
private function sleep_item($ctls)
|
|
|
{
|
|
|
$sleeps = [];
|
|
@@ -295,10 +292,10 @@ class chctl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- [$notify_count,$notify_succ] = $item->notify_statics();
|
|
|
+ [$notify_count,$ratio] = $item->notify_ratio();
|
|
|
[$commit_count,$commit_succ] = $item->commit_statics();
|
|
|
|
|
|
- if($commit_succ >= self::sleep_commit_count && $notify_count >= self::sleep_notify_count) {
|
|
|
+ if($commit_succ >= self::sleep_commit_count && $notify_count >= self::sleep_notify_count && $ratio < self::sleep_ratio) {
|
|
|
$item->sleep();
|
|
|
$sleeps[] = $item;
|
|
|
}
|