You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imgee currently uses Celery for background jobs while the rest of HasGeek's code uses RQ. For the sake of maintainability, Imgee should switch to RQ as well.
Imgee currently uses blocking requests when an image is being processed in the background – an earlier iteration returned a placeholder thumbnail until the real one was available. The blocking approach can be implemented with RQ by wrapping RQ with a queue helper:
For every request that needs a background job (thumbnail requested, but one is not in the database), first create a cache key that is deterministic – based on the image id, dimensions and transformations required ("scaled" is only one of many transformations possible)
Consult Redis for whether there is a running RQ job id for this key
If no job, queue the job and save the key to Redis with a TTL of 24 hours
Poll RQ until the job returns a result (should be a redirect URL), sleeping 1 second between polls
Remove Redis cache key and return result to the caller
The text was updated successfully, but these errors were encountered:
Imgee currently uses Celery for background jobs while the rest of HasGeek's code uses RQ. For the sake of maintainability, Imgee should switch to RQ as well.
Imgee currently uses blocking requests when an image is being processed in the background – an earlier iteration returned a placeholder thumbnail until the real one was available. The blocking approach can be implemented with RQ by wrapping RQ with a queue helper:
The text was updated successfully, but these errors were encountered: