mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
d97b035049
commit
2bf3a38686
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -937,12 +937,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "db5d81e44af053a3a3f19c1593c2d5e52d58084c"
|
||||
"reference": "7689af12e89d95c0ca5ddacd4142fcfa0af6ad5f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/db5d81e44af053a3a3f19c1593c2d5e52d58084c",
|
||||
"reference": "db5d81e44af053a3a3f19c1593c2d5e52d58084c",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/7689af12e89d95c0ca5ddacd4142fcfa0af6ad5f",
|
||||
"reference": "7689af12e89d95c0ca5ddacd4142fcfa0af6ad5f",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -959,7 +959,7 @@
|
||||
"ext-mbstring": "*",
|
||||
"topthink/framework": "^6.0"
|
||||
},
|
||||
"time": "2020-11-10T03:25:39+00:00",
|
||||
"time": "2020-11-18T02:17:40+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"think": {
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-11-07 23:06:26
|
||||
// This file is automatically generated at:2020-11-18 10:26:02
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
@ -233,7 +233,7 @@ class Queue extends Command
|
||||
$this->output->writeln('============== LISTENING ==============');
|
||||
while (true) {
|
||||
[$start, $where] = [microtime(true), [['status', '=', 1], ['exec_time', '<=', time()]]];
|
||||
foreach ($this->app->db->name($this->table)->where($where)->order('exec_time asc')->select()->toArray() as $vo) try {
|
||||
foreach ($this->app->db->name($this->table)->where($where)->order('exec_time asc')->cursor() as $vo) try {
|
||||
$command = $this->process->think("xadmin:queue dorun {$vo['code']} -");
|
||||
$this->output->comment("># {$command}");
|
||||
if (count($this->process->query($command)) > 0) {
|
||||
@ -248,7 +248,7 @@ class Queue extends Command
|
||||
]);
|
||||
$this->output->error(">> Execution failed -> [{$vo['code']}] {$vo['title']},{$exception->getMessage()}");
|
||||
}
|
||||
if (microtime(true) - $start < 0.5000) usleep(500000);
|
||||
if (microtime(true) < $start + 1) usleep(1000000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,8 @@ class QueryHelper extends Helper
|
||||
public function dateBetween($fields, string $split = ' - ', $input = null, string $alias = '#'): QueryHelper
|
||||
{
|
||||
return $this->_setBetweenWhere($fields, $split, $input, $alias, function ($value, $type) {
|
||||
return $type === 'after' ? "{$value} 23:59:59" : "{$value} 00:00:00";
|
||||
if (preg_match('#^\d{4}(-\d\d){2}\s+\d\d(:\d\d){2}$#', $value)) return $value;
|
||||
else return $type === 'after' ? "{$value} 23:59:59" : "{$value} 00:00:00";
|
||||
});
|
||||
}
|
||||
|
||||
@ -163,7 +164,8 @@ class QueryHelper extends Helper
|
||||
public function timeBetween($fields, string $split = ' - ', $input = null, string $alias = '#'): QueryHelper
|
||||
{
|
||||
return $this->_setBetweenWhere($fields, $split, $input, $alias, function ($value, $type) {
|
||||
return $type === 'after' ? strtotime("{$value} 23:59:59") : strtotime("{$value} 00:00:00");
|
||||
if (preg_match('#^\d{4}(-\d\d){2}\s+\d\d(:\d\d){2}$#', $value)) return strtotime($value);
|
||||
else return $type === 'after' ? strtotime("{$value} 23:59:59") : strtotime("{$value} 00:00:00");
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user