bvdputte / kirby-queue Goto Github PK
View Code? Open in Web Editor NEWA simple queue utility plugin for Kirby 3
License: MIT License
A simple queue utility plugin for Kirby 3
License: MIT License
In worker.php
, bootstrap.php
and the path to the Kirby folder are based on the default locations and cannot be altered.
This will give problems to people who have a non-default folder setup, or use composer.
Find a way to make this better.
Hello,
I tried to follow the instructions although I got a bit confused on how to correctly set this up.
So basically I'm trying to set a cron that hits this url: mydomain.com/gcapc/push every hour, but I'm unsure on where I should write that code. Is it on the config.php file or do I need to create it on a separate folder under site/queues? (I'm using the Poor man's cron option by the way)
I Appreciate any help, thank you!
The bvdputte\kirbyQueue\Job::get() method does not seem to be compatible with Kirby\Toolkit\Obj::get()
Declaration of bvdputte\kirbyQueue\Job::get(string $key, $default = null) must be compatible with Kirby\Toolkit\Obj::get($property, $fallback = null)
Add search methods on the queue class to search for jobs (id / data keys)
hello,
i am using php 8.1 and kirby 3.8 (dont know if other versions are behaving the same way) and i found that, that the cron function was not working for me:
if (option("bvdputte.kirbyqueue.poormanscron")) {
$root = kirby()->roots()->site() . '/' . option("bvdputte.kirbyqueue.root");
$pmcFile = $root . "/.pmc";
if (!f::exists($pmcFile)) f::write($pmcFile, time());
$nextRun = f::read($pmcFile) + option("bvdputte.kirbyqueue.poormanscron.interval");
if( $nextRun < time() ) {
// Work the queue
bvdputte\kirbyQueue\Queueworker::work();
f::write($pmcFile, time());
}
}
after changing
option("bvdputte.kirbyqueue.root");
to
kirby()->option("bvdputte.kirbyqueue.root");
it started working. so technically the complete IF looks like this:
if (option("bvdputte.kirbyqueue.poormanscron")) {
$root = kirby()->roots()->site() . '/' . kirby()->option("bvdputte.kirbyqueue.root");
$pmcFile = $root . "/.pmc";
if (!f::exists($pmcFile)) f::write($pmcFile, time());
$nextRun = f::read($pmcFile) + kirby()->option("bvdputte.kirbyqueue.poormanscron.interval");
if( $nextRun < time() ) {
// Work the queue
bvdputte\kirbyQueue\Queueworker::work();
f::write($pmcFile, time());
}
}
also, I had to set these options inside the plugin index.php, otherwise from the config.php it was not working either. strangely enough, the 'worker.route' works from the config, but i guess it is because it is called later?
options i had to set in index of plugin
'poormanscron' => true,
'poormanscron.interval' => 30, // in seconds
Has anyone managed to create queue that will keep generating thumbs? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.