Skip to content

Commit

Permalink
Allow other spatie crawler versions
Browse files Browse the repository at this point in the history
  • Loading branch information
repat committed Mar 15, 2021
1 parent 135e43c commit 57a832e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions README.md
@@ -1,13 +1,16 @@
# spatie-crawler-redis

[![Latest Version on Packagist](https://img.shields.io/packagist/v/repat/spatie-crawler-redis.svg?style=flat-square)](https://packagist.org/packages/repat/spatie-crawler-redis)
[![Total Downloads](https://img.shields.io/packagist/dt/repat/spatie-crawler-redis.svg?style=flat-square)](https://packagist.org/packages/repat/spatie-crawler-redis)

**spatie-crawler-redis** is an alternative CrawlerQueue implementing the `Spatie\Crawler\CrawlQueue\CrawlQueue` interface using Redis Hashes.

## Installation

`$ composer require repat/spatie-crawler-redis`

## Example

Create a `Predis\Client` beforehand if you need options, such as selecting a database. If you don't pass a client, a new one without options will be used. Predis assumes `127.0.0.1`, `6379` and `0` as default host, port and database. You can also pass a custom prefix, otherwise `uniqid()` will be used.

```php
Expand All @@ -30,9 +33,11 @@ $redisClient = new \Predis\Client($options);
```

## TODO

* `phpredis` support

## Testing

> Thanks spatie for the tests. These are the instructions:
To run the tests you'll have to start the included node based server first in a separate terminal window.
Expand All @@ -44,19 +49,24 @@ npm install
```

With the server running, you can start testing.

```bash
vendor/bin/phpunit
```

## License

* MIT, see [LICENSE](https://github.com/repat/spatie-crawler-redis/blob/master/LICENSE)

## Version
* Version 0.1.1

* Version 0.2

## Contact
#### repat
* Homepage: https://repat.de

### repat

* Homepage: [repat.de](https://repat.de)
* e-mail: repat@repat.de
* Twitter: [@repat123](https://twitter.com/repat123 "repat123 on twitter")

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -4,13 +4,13 @@
"keywords": ["spatie", "crawler", "redis", "crawlqueue", "predis"],
"homepage": "https://repat.de",
"license": "MIT",
"version" : "0.1.1",
"version" : "0.2",
"authors": [
{"name": "repat", "email": "repat@repat.de"}
],
"require": {
"php": ">=7.1",
"spatie/crawler": "^4.6",
"spatie/crawler": ">=4.6",
"predis/predis": "^1.1"
},
"require-dev": {
Expand Down

0 comments on commit 57a832e

Please sign in to comment.