Log in
Seblog.nl

Alles

als antwoord op forum.getkirby.com

I hope so too! My testing works fine, but I haven't completed the Webmention plugin, so I am not using it live yet :)

I don't really understand what you mean by 'a plugin for cronjobs'. What you describe is more or less what this plugin does, or am I missing something?

Note that the 'X jobs waiting' button in the widget links to /panel/queue/work at the moment, which will try and work all the jobs from the queue. Probably not the best, but it's triggering (all the) jobs from the panel, kind of as you described.

I was also thinking about adding an option for a web-bug, to use for people without Cron on their server. That would be an image, like <img src="/worker.php">, and then in worker.php, send a one-pixel image, drop connection, and then do the work, described here.

And then there is a style of worker I can't use, but what is really a worker.php: a worker that you just run with $ php worker.php in your terminal, which has something like this:

// load all of Kirby once!

while (true) {
    while (queue::hasJobs()) {
        queue::work();
    }
    sleep(10);
}
// And then just keep checking for work, every 10 seconds, 
// never ending the php script.

Oh, and it might be nice to schedule jobs for the future. In my case, "when I posted a post... check back in 12 minutes and see if my mobile phone sent my location from that time to the server". (I have an app that tracks that, and submits it every 10 minutes.) So that's a function I might add.

Enough to improve! (But I'll be working on Webmentions first.)

De algoritmen voeren me opeens advertenties voor musea. Alleen las ik eerst 'Museum de Fundate'. Note to self: minder Grindr, meer cultuur.

als antwoord op glenn.thedixons.net

Sad to hear, especially since you tried to use my plugins. But I will not try to convince you to come back, I know my plugins are lacking. They are just pieces of my own site I open sourced, but the way I cut them off might break things.

I am actively working on two new ones at the moment, with some 'official' IndieWeb libraries, with unit testing, hopefully even with panel widgets. They should be much more stable and user friendly than the old ones.

So I am not asking to come back now, but please, let me ping you when I got the new ones ready. I hope you will like those.


We're a long way from general adoption, but we can make steps.

Queue for Kirby

I was in need for a Queue, so I made one. :)


This plugin adds a basic queue to the Kirby CMS, using Cron and Kirby's flat file system.

It's mostly designed to be used in other plugins, such as the new Webmentions plugin I'm writing.

Github: https://github.com/sebsel/queue-for-kirby

queue::define('job_name', function($job) {
    $job->get('param');
    // contains 'some data' in the job added below
});

queue::add('job_name', [
    'param' => 'some data'
]);
als antwoord op dixonge

Oh hey, you're right, my webmention plugin does not pass most of the tests out of the box! I was trying to get some of the code into the Toolkit, but it seems like they are too busy with Kirby 3 and don't care about my function. I should move my code into the plugin so that it passes all but one test again.

Anyway, nice to see you using it! :)

Meer laden