Testing code which uses Celery Some of the Celery docs - for example, here - will tell you to use CELERY_ALWAYS_EAGER=True when testing so the task runs immediately. This is not the right variable.
Run and count The other day I needed to run a command a number of times and see how many times it worked, and how many times it failed (as measured by the return code). I could have done this in Python, or various other languages, but for this bash seemed like it
Things I wish I knew about… JavaScript modules I have to confess it took me a while to get my head around JavaScript modules. This is at least partly because there are two different popular module systems, CommonJS [http://www.commonjs.org/] and ECMAScript 2015 [https://en.wikipedia.org/wiki/ECMAScript] (usually shortened to ES2015). The ECMAScript 2015
JavaScript pattern - the “singleton file” The other day I came across the solution to a number of problems I’d had in the past. I imagine it’s probably obvious to anyone who’s been doing JavaScript for a while, but since it took a while to dawn on me I thought I’d try
Live reload in Hapi Something I’ve been meaning to address for a while is the lack of a livereload [https://github.com/livereload/livereload-js] plugin for Hapi [https://hapi.dev/]. Template changes are visible on manual reload if you turn off caching, but I’ve become used to automatic reloading when developing with
Things I wish I knew about… JavaScript functions Especially coming from a C/Python/Elixir background, there were some things about JavaScript functions that I really didn’t get to start with.
How to force TypeScript's compiler to rebuild your files I’ve noticed when using tsc in watch mode that sometimes - especially if a file has been renamed - it doesn’t realise the file needs recompiling. This state persists across reboots, restarting the watcher, all the usual stuff. The last time I hit this was when I needed
Some testing with Axios Recently I’ve been working on integrating with a subscription/payment gateway. (It hasn’t been straightforward, but that’s a whole other post…) I wanted to be able to test my web-hook code without repeatedly triggering events from the gateway. I stored the incoming events in JSON format, which
Hapi: using pre-route functions for fun and profit I started to think - Express has middleware, I wonder what Hapi has? There’s bound to be something so I can ...
7 Tools I Use Every Day at Work Silver Searcher (ag for short) is a fantastically fast searcher, much faster than grep. It comes with ...