从PR中学习英文表述_1
[toc]
001-from:https://github.com/laravel/laravel/pull/5361
Pest hasn’t had a stable release yet.
Pest 至今没有一个稳定的版本。
With the release of 1.0 will have to redo the tests?
随着 1.0 的发行,我们是否还需要重新进行测试?
As much as I love Pest and the work you’re doing there, I am not yet convinced that it should replace PHPUnit and therefore create additional (mental) overhead for people that are especially new to Laravel.
我也喜欢 Pest 和你做的 work,我还不确信它能替代 PHPUnit 并且因此给新手创建额外的精力的花费。
关键词:mental overhead
002-from:https://github.com/laravel/laravel/pull/866
Example in Blade view file:
…
Tried doing this before:
…
And it didn’t work.
It really makes sense. But, in this case woudn´t be better to initialize $user_photos before the view call inside the controller?
关键词:make sense 表示同意(说得通)
Personally I think something like @php and @endphp would be more expressive.
我认为像 @php 和 @endphp 表达的更清晰。
I think some kind of bracket tags would be good for short singleline php statements (including assignment). And if you want longer multiline php code for you then a standard tags are fine too imho. Maybe Blade could exclude anything from compilation inside tags.
我认为某种括号标签对于简短的单行 php 语句(包括赋值)很有用。如果你想要更长的多行 php 代码,那么标准标签也可以恕我直言。也许 Blade 可以从标签内的编译中排除任何内容。
关键词:imho (in my humble opinion)。
003:问题描述-How to avoid jobs DB table locks issue when using Laravel queues?
问题描述:
I’m using Laravel 5.1.
The queues are used for data fetching/syncing between several systems.
I use the database driver, 3 “artisan queue:work –daemon” processes are running all the time.
The jobs are dispatched both by system users and scheduler (cron). Three queues are used to prioritize the jobs.
Everything seems to be working just fine - the jobs table gets filled with records, the system takes care of them and removes the ones that are done.
However after some time locking issues are starting to interfere:
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
and
‘RuntimeException’ with message ‘Can’t swap PDO instance while within transaction.’
I haven’t tried using another queue driver yet. I’d really like to stay with database though. The engine is InnoDB, the jobs table has default structure and indexes.
Is there a way to solve this issue? What are your thoughts?
It might be worth mentioning that I call the DB::reconnect()
inside my job classes since the queue workers are running as daemons.
The jobs are dispatched using DispatchesJobs
trait as one would expect. I don’t interfere with queues algorithm in any other way.
004:问题描述-Redis 5.0.5: WARNING: The TCP backlog setting of 511
描述问题:
I have windows 10 home
, where is installed Ubuntu
1 |
|
I have installed Redis 5.0.5
(it mostly with make
and make install
)
When I startup the server with redis-server
it shows some warnings.
I have removed one about overcommit_memory
But about:
1 |
|
I have read two following links:
- link1
- link2
Thus both indicate do the following:
- Go to the
/etc
directory - Create the
rc.local
file,sudo vim rc.local
- Add the
sysctl -w net.core.somaxconn=65535
content and save
Well in a secondary terminal I execute redis-cli shutdown
and in the primary terminal execute again redis-server
Problem the same warning appears, What is missing?
Note I have the same situation even after to execute sudo chmod +x rc.local