我有一份在当地完美无瑕的工作,但在生产中我遇到了无法解决的问题.我已经涵盖了整个handle()带try/catch和部署,尽管许多其他例外我没有看到任何东西记录到Bugsnag,在其他地方.
public function handle() {
try {
// do stuff
} catch (\Exception $e) {
Bugsnag::notifyException($e);
throw $e;
}
}
Run Code Online (Sandbox Code Playgroud)
根据Laravel Horizon的说法,这个队列作业运行了0.0026001930236816406几秒钟,我从来没有看到它工作,也从未在failed_jobs表格中看到任何与此工作相关的其他错误.
配置/ queue.php
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => (60 * 10), // 10 minutes
'block_for' => null,
],
Run Code Online (Sandbox Code Playgroud)
配置/ horizon.php
'environments' => [
'production' => [
'supervisor' => [
'connection' => 'redis',
'queue' => [
'default',
],
'balance' => 'auto', …Run Code Online (Sandbox Code Playgroud) 我有一个MeetingService,通过HorizonIO从我的RethinkDB中获取数据.当尝试通过其ID获取会议时,我将始终获得null值作为响应.此服务中的其他方法无问题.
meeting.service.ts:
getMeetingById(passedId: string): Observable<Meeting[]> {
return this.table.find({meetingId: passedId}).fetch();
}
Run Code Online (Sandbox Code Playgroud)
会议-detail.component.ts:
currentMeeting: Meeting;
getCurrentMeeting(): void {
this._meetingsService.getMeetingById(this.passedId).subscribe(
(returnMeetings: Meeting[]) => {
this.currentMeeting = returnMeetings[0];
}
);
}
Run Code Online (Sandbox Code Playgroud)
即使我将passId更改为我直接从我的数据库(通过管理面板)获取的ID,该方法仍然返回null.
如果我更改代码以返回表中的第一个值,一切都会起作用.
getMeetingById(passedId: string): Observable<Meeting[]> {
return this.table.order("meetingId", "descending").limit(1).fetch();
}
Run Code Online (Sandbox Code Playgroud)
最终结果是在我的视图中currentMeeting var上未定义错误:
EXCEPTION: Error in ./MeetingDetailComponent class MeetingDetailComponent - inline template:1:4 caused by:
Cannot read property 'meetingId' of undefined
Run Code Online (Sandbox Code Playgroud)
编辑:显示不同实现的附加代码:
load() {
if(this.passedId != null) {
this._feedService.GetFeedById(this.passedId).subscribe(
(returnFeed: Feed[]) => {
this.currentFeed = returnFeed[0];
}
);
} else {
this._feedService.GetFirstFeed().subscribe(
(returnFeed: Feed[]) => …Run Code Online (Sandbox Code Playgroud) 我在我的本地环境中有 testet laravel Horizon,一切都按预期工作。当我切换到生产域/地平线时会抛出 403 错误。我已经按照文档中的说明在 HorizonServiceProvider 中设置了门 - 第一步只是在没有身份验证的情况下获得访问权限。我的门现在看起来像这样:
{
Gate::define('viewHorizon', function ($user = null) {
return true;
});
}
Run Code Online (Sandbox Code Playgroud)
谁能建议我缺少什么?
我的堆栈是Horizon + React.我想在我的客户端使用基础6.我使用webpack作为我的js,但是当我尝试将它与css一起使用时,我只得到基础css的评论,但没有css.
我的文件是:
webpack.config.js:
const path = require('path');
var config = {
context: __dirname + "/src",
entry: "./js/main.js",
output: {
filename: "bundle.js",
path: __dirname + "/dist"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
}
]
},
resolve: {
modulesDirectories: ['./node_modules']
},
};
module.exports = config;
Run Code Online (Sandbox Code Playgroud)
main.scss:
@import "../../node_modules/foundation-sites/scss/foundation";
Run Code Online (Sandbox Code Playgroud)
main.js:
...
//adding css
require("../css/main.scss");
...
Run Code Online (Sandbox Code Playgroud)
在网页上我只看到:
/**
* Foundation for Sites …Run Code Online (Sandbox Code Playgroud) 我正在安装 openstack(乌苏里最小部署),我已经安装了 Horizon,但我面临无效的凭据。您可能会在下面找到配置:
您可以在下面找到 Horizon 配置、openstack 域和用户:
[root@controller ~]# grep ^[^#] /etc/openstack-dashboard/local_settings
import os
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard.settings import HORIZON_CONFIG
DEBUG = False
OPENSTACK_HOST = "controller"
ALLOWED_HOSTS = ['*']
WEBROOT = '/dashboard'
LOCAL_PATH = '/tmp'
SECRET_KEY='971e40214e7da556a451'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'controller:11211',
}
}
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
OPENSTACK_KEYSTONE_URL = "http://%s/identity/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_API_VERSIONS = {
"identity": 3,
"image": 2,
"volume": 3,
}
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
TIME_ZONE = …Run Code Online (Sandbox Code Playgroud)