Comments (19)
Minion explicitly states that it supports job progress, so it's natural to me to go looking for where that support is.
from minion.
The guide is now a planned feature, but i have no idea when i'll get around to actually writing it. #100
from minion.
Theoretically this would be possible to implement with PostgreSQL listen/notify, but the SQLite and MySQL backends could not provide the feature. So we are not going to do it. And it's too complex to include as a documentation example.
from minion.
Ok, so could you at least mention in the documentation that using progress requires polling the database?
from minion.
How about you point out specifically the sections of the documentation that you think are too ambiguously worded? And then we'll see about rephrasing.
from minion.
Well I'm not sure it's an issue of ambiguity as much as omission. You mention progress at first in the Minion docs here:
Minion is a high performance job queue for the Perl programming
language, with support for multiple named queues, priorities, delayed
jobs, job dependencies, job progress,...
Then you hint at the idea here further down in the same page:
job
my $job = $minion->job($id);
Get Minion::Job object without making any changes to the actual job or
return "undef" if job does not exist.
# Check job state
my $state = $minion->job($id)->info->{state};
# Get job metadata
my $progress = $minion->$job($id)->info->{notes}{progress};
I guess that can be generalized as metadata but as far as I can tell there's really two metadatum ... notes and results. Progress is really a subset of notes.
The word progress is not mentioned further. Digging into the documentation, there appears to be confusion in Minion::Job's docs because in the same page you first say this:
info
my $info = $job->info;
Get job information.
# Check job state
my $state = $job->info->{state};
# Get job metadata
my $progress = $job->info->{notes}{progress};
but further down you say this:
note
my $bool = $job->note(mojo => 'rocks', minion => 'too');
Change one or more metadata fields for this job. ...
# Share progress information
$job->note(progress => 95);
Perhaps I'm mistaken, but I really see 'note' as the metadata since it's just an arbitrary hash reference conceptually.
Nowhere else that I have found do I see information or examples as to how to retrieve this progress information when it changes. Maybe you could add some blurb that says "getting the notes requires polling the database for them so you can detect when they change"? I just threw that out there. ;)
from minion.
from minion.
Yes, you're reading too much into the example. The notes feature is job progress information, there is no subset.
from minion.
I think what it all comes down to is that the Minion guide explaining all the features with examples is still missing.
from minion.
A guide which explains all the features with examples would address my concerns. IMHO if I have to look at your code to understand what something actually does, the documentation is by definition lacking in that area.
Not that I don't like looking at your code either, you have a uniquely terse style that can be fun to figure out...and not that people who are using your code shouldn't look at it anyway...but this is strictly a measure of documentation quality.
from minion.
I've addressed the event issue myself because I use the Pg backend. What would it take to get support for listen/notify in SQLite or MySQL? Can you do listen/notify without Pg? I'm just curious here.
from minion.
It's not possible with SQLite because there is no server.
from minion.
from minion.
It's not possible with SQLite because there is no server.
I'm just covering all the bases here. I recognize this, but maybe someone has written something that does pubsub for SQLite or even for nothing at all (rabbiveesh's comment ... redis for example). I'm trying to work within the bounds of what has been stated to get the feature I feel should likely be a part of Minion.
So to my original request ... not a wanted feature then? I can live with that as long as every other option has been exhausted. Maybe you could make pubsub event an optional feature of Minion::Backend::Pg?
from minion.
from minion.
You're working with too blunt of a hammer. You're assuming that EVERY item
put in notes is related to progress, which isn't necessarily true.
You might be misunderstanding me. I see this:
# Get job metadata
my $progress = $job->info->{notes}{progress};
and I assume progress is a subset of notes. I even said that:
I guess that can be generalized as metadata but as far as I can tell there's really two metadatum ... notes and results. Progress is really a subset of notes
Not sure what you are perceiving here. :)
from minion.
from minion.
So if notes is a hashref and progress can be a hashref (it always is in my case) and progress/hashref is a key/value pair in notes... in that case is it not valid to say that progress is a subset of notes?
from minion.
You might want to continue that discussion in the Google Group or on IRC.
from minion.
Related Issues (20)
- Add a Minion guide HOT 2
- [Feature Request] Add search bar to Minion Admin site HOT 7
- fix typo at Minion::Guide HOT 1
- [Feature Request] ability to filter delayed jobs HOT 1
- Incorrect count for attempts upon ultimate failure? HOT 3
- popper.js not found HOT 2
- [Feature request] allow signals to be sent to workers as well HOT 5
- A Mojolicious app w/ Minion::Backend::Pg always connects to PostgreSQL db on startup HOT 2
- Repair may stuck when many failed jobs HOT 6
- Batch enqueue HOT 2
- linkcheck doesn't work - links never checked HOT 5
- Minion.unlock() concurrency HOT 4
- [Feature Request] Minion Backend list_jobs: using args as search filter HOT 5
- Minion::Admin can not remove retry inactive task HOT 6
- [Feature Request] Allow registering subclass of Minion::Job as task HOT 13
- [Feature Request] Include Test::Minion subclass/role of Test::Mojo HOT 10
- action buttons don't perform their actions, only redirect HOT 2
- Calling `finish`, `note` etc in task code fails on macOS while communicating over TCP HOT 6
- [Feature Request] Finalizier task for locks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minion.