Posts

Showing posts with the label queue

Laravel: Sending Mail with Queue ignores Locale

Laravel: Sending Mail with Queue ignores Locale My Email template looks like this: @component('mail::message') # {{ $helloUser }} @lang('welcome.message') This App::setLocale('de); $activeMail = new AppMailRegisterActivate($user); Mail::to($user)->send($activeMail); will send an mail with German text. However, when I use a queue App::setLocale('de); $activeMail = new AppMailRegisterActivate($user); Mail::to($user)->queue($activeMail); The mail is send in English, which is the default language of my app. How can I send a message in German with the queue without changing the default language? 2 Answers 2 In Laravel 5.6. the Mailable class has gotten a locale method to care for this: Mailable locale $activeMail = new AppMailRegisterActivate($user)->locale('tr'); Mail::to($user)->queue($activeMail); For Laravel < 5.6 you have to save the text in the ma...

How to find a TFS release in progress?

How to find a TFS release in progress? I need to fail a build on TFS 2018 if its pipeline is not fully complete. Batching just the build is not enough; the linked release must be finished as well before another build can begin. My idea is to do this in a PowerShell script via the REST API. I see in the official documentation here that there's a property called TaskStatus . It provides a value of inProgress , presumably for releases that are in progress. This might do the trick, but there's no indication of how to actually use it. TaskStatus inProgress Using the REST API, how can I get the TaskStatus of a given release? TaskStatus I don't understand why you'd want to do this. Can you give some context? A release failing doesn't necessarily mean that the build itself is bad. – Daniel Mann 2 days ago ...