sanwhere this is not a extension , read first post (documentation) to configure correctly

luceos If you don't understand the instructions provided it's best to get professional help or alternatively rely on the glowingblue redis setup extension. In both cases basic understanding of installing and configuring services like redis are recommended.

    sanwhere i have installed this but did not setup

    we just need to add to these lines to extend.php right?

    return [
        new Blomstra\Redis\Extend\Redis([
            'host' => '127.0.0.1',
            'password' => null,
            'port' => 6379,
            'database' => 1,
        ])
    ];

      Hari use different databases please. See the instructions.

      • Hari replied to this.

        luceos i have added this in extend.php file

        return [
            (new Blomstra\Redis\Extend\Redis([
                'host' => '127.0.0.1',
                'password' => null,
                'port' => 6379,
                'database' => 1,
            ]))
            ->useDatabaseWith('cache', 1)
            ->useDatabaseWith('queue', 2)
            ->useDatabaseWith('session', 3)
        ];

        if i run this command php flarum queue:work

        i am getting this result

        [2021-07-11 07:56:00][qByowZ3FOKSbh28b6wNoaYkztHZE9hBK] Processing: Flarum\Notification\Job\SendNotificationsJob
        [2021-07-11 07:56:00][qByowZ3FOKSbh28b6wNoaYkztHZE9hBK] Processed: Flarum\Notification\Job\SendNotificationsJob

        does this mean its working?

          Hari yes it is. Now you need to set the worker up as a daemon, using supervisor or systemd.

            Hari gb setup won't solve this. This step is required to have the queue process jobs in the background, unattended. To get this done it needs to run as a daemon, continuously and be restarted on failure. If you don't take care of this step, pending jobs will pile up without being processed.

              luceos I want to show cache pages to logged out users and spiders.

              Can I just go with redis cache without the quee and sessions? Will that requires daemon setup?

                Hari sessions and cache work perfectly fine without the queue. Make sure to use disable('queue') in your extend.php:

                return [
                    (new Blomstra\Redis\Extend\Redis([
                        'host' => '127.0.0.1',
                        'password' => null,
                        'port' => 6379,
                        'database' => 1,
                    ]))
                    ->useDatabaseWith('cache', 1)
                    ->useDatabaseWith('session', 3)
                    ->disable('queue')
                ];
                • Hari replied to this.

                  Hari i don't have access, cloudways limit certain commands. its a long process to explain them regarding this. i will wait for GB setup

                  If you don't have full access on the server because you have shared hosting, for example, then you can still use Redis Queue.
                  What I did was to set up a cron for such a script:

                  #set -x
                  
                  queue=`ps -aux | grep "flarum queue:work" | grep -v grep`
                  if [[ -z $queue ]]; then
                  while true :
                  	do
                  		[[ -z $queue ]] && { php flarum queue:work; }
                  	done
                  else
                  exit 0
                  fi

                  When a process fails for some reason, cron will start it again.

                    luceos after updating this website is showing 500 error

                    rafaucau i do have access but its hard for me to setup daemon

                      luceos

                      edit : its working now - it happened due to cloudflare cache

                      edit2:

                      luceos This step is required to have the queue process jobs in the background, unattended. To get this done it needs to run as a daemon, continuously and be restarted on failure. If you don't take care of this step, pending jobs will pile up without being processed.

                      if i do not want queues i don't need deamon and need not to maintain anything right?

                        Hari if i do not want queues i don't need deamon

                        Correct. I can't answer the second question.

                        Hari I used this code to make it work.

                        Hari I am getting same output, so it means it is working. I have 1 database.

                        luceos I didn't add this, I get the think, but how can I do that, can you give me an example or clue so I can dig it.

                        • Hari replied to this.

                          sanwhere I didn't add this, I get the think, but how can I do that, can you give me an example or clue so I can dig it.

                          if you are a non-techqnical person ignore that step. (i have ignored) just go with below mentioned setup

                          return [
                              (new Blomstra\Redis\Extend\Redis([
                                  'host' => '127.0.0.1',
                                  'password' => null,
                                  'port' => 6379,
                                  'database' => 1,
                              ]))
                              ->useDatabaseWith('cache', 1)
                              ->useDatabaseWith('session', 3)
                              ->disable('queue')
                          ];

                          luceos To get this done it needs to run as a daemon, continuously and be restarted on failure. If you don't take care of this step, pending jobs will pile up without being processed.

                            Hari I am a technical person, I have a server and I am taking care of it. I would like to add it, otherwise it does not make any sense as @luceos said:

                            If you don't take care of this step, pending jobs will pile up without being processed.

                            @luceos

                            I tried to install it on flarum 15 using composer require blomstra/flarum-redis: ^ 0.2.4-beta
                            It installed successfully
                            Then i went inside public_html/vendor/blomstra/flarum-redis/extend.php

                            i updated it like this

                            return [
                                new Blomstra\Redis\Extend\Redis([
                                    'host' => '127.0.0.1',
                                    'password' => null,
                                    'port' => 6379,
                                    'database' => 1,
                                ])
                            ];

                            I activated it in admin panel and
                            then i run php flarum queue:work which i got this response There are no commands defined in the "queue" namespace.

                            I Ignored, and tried to surf my site but then it had already broken showing the HTTP/Server message. 😓

                            Inside storage/cache there were many folders populated

                            Maybe am missing something?

                            My flarum speed grade score is C. I want to make this one work and score A like @[deleted]