Skip to content

Instantly share code, notes, and snippets.

@stringfellow
stringfellow / problem.md
Last active August 8, 2018 10:45
Celery hang problem

Celery 4.1.0, Redis client 2.10.6, Redis server 4.0

I have a problem that seems to be related to synchronous subtasks, except that none of the workarounds (or indeed the errors/warnings that I should expect from the docs) are having any effect.

I have 3 worker servers, A B and C

  • A and B run the same codebase.
  • A calls apply_async of a Task1. Get/Forget not called (it doesn't care about the result itself, but we want the result stored in the backend)
  • Task1 gets run by server B.
  • Within Task1 (now executed on server B) - Task2 from another codebase is called - using send_task (since the codebase is not shared here).
@stringfellow
stringfellow / pong-chat.md
Last active December 21, 2022 11:33
ChatGPT wrote Pong in an IIFE..!

Me: Using the language Javascript, create an IIFE that will play the game of Pong when run in a chrome debug console.

ChatGPT: Here is an example of how you could create an immediately invoked function expression (IIFE) that plays the game of Pong when run in a Chrome debug console:

Copy code

(function() {
  // set up canvas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.