我在Laravel上php artisan queue:listen用来运行排队的工作.其中一个工作相当复杂,需要很长时间,因此我收到以下错误:
[Symfony\Component\Process\Exception\ProcessTimedOutException]                                                                                                                                                                              
The process ""/usr/local/Cellar/php55/5.5.14/bin/php" artisan queue:work  
--queue="QUEUE_URL" --delay=0 --memory=128 --sleep=3 --tries=0" 
exceeded the timeout of 60 seconds.
我知道我可以运行queue:listen一个任意高的超时值,但是这不是理想的,因为我不希望它的活动时间,一些过程实际上 unreseponsive.我尝试set_time_limit(60)在作业调用的函数内定期调用,但这并没有解决我的问题.
我找到了一个在线提及的线程Symfony\Component\Process\Process->setTimeout(null),但我不知道如何访问该进程对象,或者如果这甚至可以解决问题.
任何帮助将非常感激.
我对Angular指令很新,而且我很难做到这样做我想做的事情.这是我所拥有的基础知识:
控制器:
controller('profileCtrl', function($scope) {
  $scope.editing = {
    'section1': false,
    'section2': false
  }
  $scope.updateProfile = function() {};
  $scope.cancelProfile = function() {};
});
指示:
directive('editButton', function() {
  return {
    restrict: 'E',
    templateUrl: 'editbutton.tpl.html',
    scope: {
      editModel: '=ngEdit'
    }
  };
});
模板(editbutton.tpl.html):
<button
  ng-show="!editModel"
  ng-click="editModel=true"></button>
<button
  ng-show="editModel"
  ng-click="updateProfile(); editModel=false"></button>
<button
  ng-show="editModel"
  ng-click="cancelProfile(); editModel=false"></button>
HTML:
<edit-button ng-edit="editing.section1"></edit-button>
如果不清楚,我希望<edit-button>标签包含三个不同的按钮,每个按钮与传入的任何范围属性进行交互ng-edit.单击时,它们应更改该属性,然后调用相应的范围方法.
现在的方式,单击按钮正确更改值$scope.editing,但updateProfile和cancelProfile方法不起作用.我可能会偏离如何正确使用指令,但我在网上找到一个例子来帮助我完成我想要做的事情.任何帮助,将不胜感激.
我正在使用Laravel 4 Mail::queue()通过内置的Mailgun驱动程序发送电子邮件。问题是我希望能够从多个Mailgun域发送电子邮件,但是必须在中设置该域app/config/services.php。由于正在使用Mail::queue(),所以我看不到如何动态设置该配置变量。
有什么办法可以满足我的要求吗?理想情况下,我希望能够在调用时传递域Mail::queue()(Mailgun api密钥对于我要从中发送的所有域都是相同的)。