File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ complete:
61
61
env :
62
62
CODECLIMATE_REPO_TOKEN : " f5222770741fef12c55315f61a267c8a615908e511241618ce171129e8217e63"
63
63
shell :
64
- - " php /var/www/PHPCI/vendor/bin/phpunit --coverage-clover %BUILD_PATH%/storage/coverage/clover.xml -c %BUILD_PATH%/phpunit.xml %BUILD_PATH%/tests"
65
- - " php /var/www/PHPCI/vendor/bin/test-reporter --coverage-report=%BUILD_PATH%/storage/coverage/clover.xml"
64
+ - " php /var/www/PHPCI/latest/ vendor/bin/phpunit --coverage-clover %BUILD_PATH%/storage/coverage/clover.xml -c %BUILD_PATH%/phpunit.xml %BUILD_PATH%/tests"
65
+ - " php /var/www/PHPCI/latest/ vendor/bin/test-reporter --coverage-report=%BUILD_PATH%/storage/coverage/clover.xml"
66
66
67
67
success :
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Database \Eloquent \Model ;
6
6
use Illuminate \Database \Eloquent \SoftDeletes ;
7
+ use Illuminate \Support \Facades \App ;
8
+ use Illuminate \Support \Facades \DB ;
7
9
use Illuminate \Support \Facades \Lang ;
8
10
use REBELinBLUE \Deployer \Contracts \RuntimeInterface ;
9
11
use REBELinBLUE \Deployer \Events \ModelChanged ;
@@ -316,4 +318,18 @@ public function getRepoFailureAttribute()
316
318
{
317
319
return ($ this ->commit === self ::LOADING && $ this ->status === self ::FAILED );
318
320
}
321
+
322
+ /**
323
+ * A little hack to reconnect to the database if we're in console mode and trying to find a deployment.
324
+ * Should fix the error sending STMT_PREPARE problem that causes deployments to sit "pending" forever.
325
+ * @return mixed
326
+ */
327
+ public function findOrFail ()
328
+ {
329
+ if (App::runningInConsole ()) {
330
+ DB ::reconnect ();
331
+ }
332
+
333
+ return parent ::__call ('findOrFail ' , func_get_args ());
334
+ }
319
335
}
You can’t perform that action at this time.
0 commit comments