diff --git a/app/process/Task.php b/app/process/Task.php new file mode 100644 index 0000000..1b5dcae --- /dev/null +++ b/app/process/Task.php @@ -0,0 +1,38 @@ +generatePrivateUrl($vehicle['img_url'],86400); + Cache::set('img_dibai_'.$vehicle->id, $img_url, 86390); + } + + Log::info('img cache end',[time()]); + }); + + } + +} \ No newline at end of file diff --git a/composer.json b/composer.json index 014185f..cb56d2b 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,8 @@ "shopwwi/webman-filesystem": "^1.1", "shopwwi/filesystem-oss": "^1.0", "webman/console": "^2.1", - "webman/cache": "^2.1" + "webman/cache": "^2.1", + "workerman/crontab": "^1.0" }, "suggest": { "ext-event": "For better performance. " diff --git a/composer.lock b/composer.lock index 04d5149..3db0971 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f6e35a2675e1ce0c8495ad470f4e9ecd", + "content-hash": "2dc28180e70f613eb100a93e80076a5e", "packages": [ { "name": "aliyuncs/oss-sdk-php", @@ -5441,6 +5441,62 @@ }, "time": "2025-02-17T03:34:21+00:00" }, + { + "name": "workerman/crontab", + "version": "v1.0.7", + "source": { + "type": "git", + "url": "https://github.com/walkor/crontab.git", + "reference": "74f51ca8204e8eb628e57bc0e640561d570da2cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/walkor/crontab/zipball/74f51ca8204e8eb628e57bc0e640561d570da2cb", + "reference": "74f51ca8204e8eb628e57bc0e640561d570da2cb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.0", + "workerman/workerman": ">=4.0.20" + }, + "type": "library", + "autoload": { + "psr-4": { + "Workerman\\Crontab\\": "./src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "walkor", + "email": "walkor@workerman.net", + "homepage": "http://www.workerman.net", + "role": "Developer" + } + ], + "description": "A crontab written in PHP based on workerman", + "homepage": "http://www.workerman.net", + "keywords": [ + "crontab" + ], + "support": { + "email": "walkor@workerman.net", + "forum": "http://wenda.workerman.net/", + "issues": "https://github.com/walkor/workerman/issues", + "source": "https://github.com/walkor/crontab", + "wiki": "http://doc.workerman.net/" + }, + "time": "2025-01-15T07:20:50+00:00" + }, { "name": "workerman/webman-framework", "version": "v2.1.2",