<commit_before># Aliyun MNS Queue Driver For Laravel

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Total Downloads][ico-downloads]][link-downloads]


This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
PSRs you support to avoid any confusion with users and contributors.

## Install

Via Composer

``` bash
$ composer require lokielse/laravel-mns
```

## Config

Add following service providers into your providers array in `config/app.php`

``` php
Lokielse\LaravelMNS\LaravelMNSServiceProvider::class
```

Edit your `config/queue.php`, add `mns` connection

```php
'mns'        => [
	'driver'   => 'mns',
	'key'      => env('MNS_ACCESS_KEY'),
	'secret'   => env('MNS_SECRET_KEY'),
	'endpoint' => env('MNS_ENDPOINT'),
	'queue'    => env('QUEUE_NAME', 'default'),
],
```

Edit your `.env` file

```bash
QUEUE_DRIVER=mns
QUEUE_NAME=foobar-local
MNS_ACCESS_KEY=your_acccess_key
MNS_SECRET_KEY=your_secret_key
MNS_ENDPOINT=http://12345678910.mns.cn-hangzhou.aliyuncs.com/
```

## Usage

First create queues at [Aliyun MNS Console](https://mns.console.aliyun.com/)

Then update `MNS_ENDPOINT` in `.env`

Push a test message to queue

```php
Queue::push(function($job){
	/**
	 * Your statments go here
	 */
	$job->delete();
});
```

Create queue listener, run command in terminal

```bash
$ php artisan queue:listen
```

## Commands
Clear messages on Aliyun

```bash
$ php artisan queue:mns:clear
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

``` bash
$ composer test
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

## Security

If you discover any security related issues, please email <EMAIL> instead of using the issue tracker.

## Credits

- [lokielse][link-author]
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/lokielse/laravel-mns.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/lokielse/laravel-mns/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/lokielse/laravel-mns.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/lokielse/laravel-mns.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/lokielse/laravel-mns.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/lokielse/laravel-mns
[link-travis]: https://travis-ci.org/lokielse/laravel-mns
[link-scrutinizer]: https://scrutinizer-ci.com/g/lokielse/laravel-mns/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/lokielse/laravel-mns
[link-downloads]: https://packagist.org/packages/lokielse/laravel-mns
[link-author]: https://github.com/lokielse
[link-contributors]: ../../contributors
<commit_msg>remove desc<commit_after># Aliyun MNS Queue Driver For Laravel

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Total Downloads][ico-downloads]][link-downloads]

## Install

Via Composer

``` bash
$ composer require lokielse/laravel-mns
```

## Config

Add following service providers into your providers array in `config/app.php`

``` php
Lokielse\LaravelMNS\LaravelMNSServiceProvider::class
```

Edit your `config/queue.php`, add `mns` connection

```php
'mns'        => [
	'driver'   => 'mns',
	'key'      => env('MNS_ACCESS_KEY'),
	'secret'   => env('MNS_SECRET_KEY'),
	'endpoint' => env('MNS_ENDPOINT'),
	'queue'    => env('QUEUE_NAME', 'default'),
],
```

Edit your `.env` file

```bash
QUEUE_DRIVER=mns
QUEUE_NAME=foobar-local
MNS_ACCESS_KEY=your_acccess_key
MNS_SECRET_KEY=your_secret_key
MNS_ENDPOINT=http://12345678910.mns.cn-hangzhou.aliyuncs.com/
```

## Usage

First create queues at [Aliyun MNS Console](https://mns.console.aliyun.com/)

Then update `MNS_ENDPOINT` in `.env`

Push a test message to queue

```php
Queue::push(function($job){
	/**
	 * Your statments go here
	 */
	$job->delete();
});
```

Create queue listener, run command in terminal

```bash
$ php artisan queue:listen
```

## Commands
Clear messages on Aliyun

```bash
$ php artisan queue:mns:clear
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

``` bash
$ composer test
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

## Security

If you discover any security related issues, please email <EMAIL> instead of using the issue tracker.

## Credits

- [lokielse][link-author]
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/lokielse/laravel-mns.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/lokielse/laravel-mns/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/lokielse/laravel-mns.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/lokielse/laravel-mns.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/lokielse/laravel-mns.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/lokielse/laravel-mns
[link-travis]: https://travis-ci.org/lokielse/laravel-mns
[link-scrutinizer]: https://scrutinizer-ci.com/g/lokielse/laravel-mns/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/lokielse/laravel-mns
[link-downloads]: https://packagist.org/packages/lokielse/laravel-mns
[link-author]: https://github.com/lokielse
[link-contributors]: ../../contributors

{'fraction_non_alphanumeric': 0.1585, 'fraction_numerical': 0.0036666666666666666, 'mean_word_length': 5.080040526849038, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 26, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5460841', 'n_tokens_mistral': 2298, 'n_tokens_neox': 2203, 'n_words': 422}