Skip to content

Instantly share code, notes, and snippets.

Avatar

Doried Abdallah doried-a-a

View GitHub Profile
View messenger.yml
services:
_defaults:
autoconfigure: true
autowire: true
message_bus:
class: Symfony\Component\Messenger\MessageBus
tags: ['messenger.bus']
arguments: [[]]
View ImageFilterAppliedMessageHandler.php
<?php
namespace AppBundle\MessageHandlers;
use whatever\ImagesBundle\Messages\ImageFilterAppliedMessage;
use Predis\Client;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
class ImageFilterAppliedMessageHandler implements MessageHandlerInterface
View ImageFilterAppliedMessage.php
<?php
namespace whatever\ImagesBundle\Messages;
class ImageFilterAppliedMessage
{
protected $redisKey;
protected $imagePath;
View redis_image_server.js
const express = require('express');
const urlJoin = require('url-join');
const path = require('path');
// you can uncomment those two lines, and create a .env file to store following configs in.
//const readConfig = require('@oufok/env-reader').readEnv;
//let configDir = path.join(__dirname, './config');
const REDIS_HOST="localhost";
const REDIS_IMAGE_SERVICE_HOST="http://localhost";
View CacheResolver.php
<?php
use Liip\ImagineBundle\Binary\BinaryInterface;
use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface;
use Predis\Client;
use Symfony\Component\Messenger\MessageBusInterface;
class CacheResolver implements ResolverInterface
{
protected $redis;
You can’t perform that action at this time.