mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 17:55:35 +00:00
add queue offset / limit attributes
This commit is contained in:
parent
8513008e94
commit
b7444b8f12
2 changed files with 6 additions and 4 deletions
|
|
@ -87,7 +87,7 @@ php src/cli/document/search.php '@title "*"' [limit]
|
||||||
Import index from YGGo database
|
Import index from YGGo database
|
||||||
|
|
||||||
```
|
```
|
||||||
php src/cli/yggo/import.php 'host' 'port' 'user' 'password' 'database' [unique]
|
php src/cli/yggo/import.php 'host' 'port' 'user' 'password' 'database' [unique=off] [start=0] [limit=100]
|
||||||
```
|
```
|
||||||
|
|
||||||
Source DB fields required:
|
Source DB fields required:
|
||||||
|
|
@ -97,4 +97,6 @@ Source DB fields required:
|
||||||
* `user`
|
* `user`
|
||||||
* `password`
|
* `password`
|
||||||
* `database`
|
* `database`
|
||||||
* `unique` - optional, check for unique URL (takes more time)
|
* `unique` - optional, check for unique URL (takes more time)
|
||||||
|
* `start` - optional, offset to start queue
|
||||||
|
* `limit` - optional, limit queue
|
||||||
|
|
@ -60,8 +60,8 @@ catch (Exception $error)
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$start = 0;
|
$start = isset($argv[7]) ? (int) $argv[7] : 0;
|
||||||
$limit = 100;
|
$limit = isset($argv[8]) ? (int) $argv[8] : 100;
|
||||||
|
|
||||||
$total = $yggo->query('SELECT COUNT(*) AS `total` FROM `hostPage`
|
$total = $yggo->query('SELECT COUNT(*) AS `total` FROM `hostPage`
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue