Browse Source

add queue offset / limit attributes

main
ghost 1 year ago
parent
commit
b7444b8f12
  1. 4
      README.md
  2. 4
      src/cli/yggo/import.php

4
README.md

@ -87,7 +87,7 @@ php src/cli/document/search.php '@title "*"' [limit] @@ -87,7 +87,7 @@ php src/cli/document/search.php '@title "*"' [limit]
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:
@ -98,3 +98,5 @@ Source DB fields required: @@ -98,3 +98,5 @@ Source DB fields required:
* `password`
* `database`
* `unique` - optional, check for unique URL (takes more time)
* `start` - optional, offset to start queue
* `limit` - optional, limit queue

4
src/cli/yggo/import.php

@ -60,8 +60,8 @@ catch (Exception $error) @@ -60,8 +60,8 @@ catch (Exception $error)
exit;
}
$start = 0;
$limit = 100;
$start = isset($argv[7]) ? (int) $argv[7] : 0;
$limit = isset($argv[8]) ? (int) $argv[8] : 100;
$total = $yggo->query('SELECT COUNT(*) AS `total` FROM `hostPage`

Loading…
Cancel
Save